question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

undocumented peer dependencies (babel)

See original GitHub issue

Current behavior:

When we install projects with pnpm then we get an error due to missing peer dependencies that are not mentioned in your documentation:

image

https://emotion.sh/docs/introduction#react

image

To reproduce:

Install @emotion/react via pnpm instead of yarn or npm.

Expected behavior:

Environment information:

  • react version:
  • @emotion/react version: 11.10.4

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Andaristcommented, Dec 15, 2022

This will allow developers that uses Next 13 or future versions of @vitejs/plugin-react-swc to not download any code related to Babel.

That was an idea behind the current setup with optional peer deps.

In more concrete terms: Is it possible to make @emotion/babel-plugin an optional peer dependency?

In theory - yes, but in practice this can be seen as a breaking change and I’m hesitant to introduce such a change in v11.

0reactions
ArnaudBarrecommented, Dec 15, 2022

I don’t know at all how Babel is integrated with @emotion/react and how complicated this would be but what could be useful is to make @emotion/react independent of Babel, and letting the user choose if they want to install Babel plugins or SWC plugins to handle the build-time transformations.

This will allow developers that uses Next 13 or future versions of @vitejs/plugin-react-swc to not download any code related to Babel.

In more concrete terms: Is it possible to make @emotion/babel-plugin an optional peer dependency?

Read more comments on GitHub >

github_iconTop Results From Across the Web

UNMET PEER DEPENDENCY babel-core@5.8.38
But I seem to encountered a critical error that prevents me from installation. I typed in the following command: npm install --save-dev babel-core...
Read more >
babel-plugin-styled-components - Issues - Socket - Socket.dev
Start using Socket to analyze babel-plugin-styled-components and its 5 dependencies to secure your ... Package specifies peer dependencies in package.json.
Read more >
@babel/eslint-parser | Yarn - Package Manager
Fast, reliable, and secure dependency management. ... @babel/eslint-parser ... readme. babel. The compiler for writing next generation JavaScript.
Read more >
next-graphql-react - UNPKG
28, - Updated the [`react`](https://npm.im/react) peer dependency to `16.8 - 17` ... build ESM and CJS to simplify package scripts, Babel and ESLint...
Read more >
@webpack-blocks/webpack: Versions | Openbase
There was an undocumented limitation before when passing custom webpack rule ... from babel6 to babel and moved babel-core to be a peer...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found