Skip to content

Peer dependency warning from @svgr/coreΒ #785

@joshkel

Description

@joshkel

πŸ› Bug Report

Installing @svgr/core with Yarn Modern (Yarn 2+) gives the following warning:

➀ YN0002: β”‚ @svgr/core@npm:6.4.0 doesn't provide @babel/core (p0b84c), requested by @svgr/babel-preset

From what I understand, this may cause problems when using @svgr/core with Yarn Modern's PnP resolver.

I believe this was introduced by #781. It could be fixed by adding @babel/core as an additional dependency of @svgr/core.

To Reproduce

From a new directory:

➜  tmp ls
yarn init -2
yarn add @svgr/core

Expected behavior

No Yarn warnings.

Link to repl or repo (highly encouraged)

Not needed (it's easy to create locally, following the instructions above)

Run npx envinfo --system --binaries --npmPackages @svgr/core,@svgr/cli,@svgr/webpack,@svgr/rollup --markdown --clipboard

## System:
 - OS: macOS 12.6
 - CPU: (10) arm64 Apple M1 Pro
 - Memory: 74.59 MB / 16.00 GB
 - Shell: 5.8.1 - /bin/zsh
## Binaries:
 - Node: 16.15.1 - ~/.nvm/versions/node/v16.15.1/bin/node
 - Yarn: 1.22.19 - /opt/homebrew/bin/yarn
 - npm: 8.11.0 - ~/.nvm/versions/node/v16.15.1/bin/npm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions