Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing @babel/core dependency #736

Closed
rtritto opened this issue Aug 17, 2021 · 4 comments · Fixed by #739
Closed

Missing @babel/core dependency #736

rtritto opened this issue Aug 17, 2021 · 4 comments · Fixed by #739

Comments

@rtritto
Copy link

rtritto commented Aug 17, 2021

Summary

After I install styled-jsx with yarn, I get dependency not found warnings in yarn log.

@babel/core should be added in dependencies.

Versions

  • styled-jsx: 4.0.0

How To Reproduce

Steps to reproduce the behavior:

  1. yarn init -y
  2. yarn set version berry
  3. yarn add styled-jsx react
  4. See yarn log

Results

Actual

➤ YN0000: ┌ Resolution step
➤ YN0002: │ styled-jsx@npm:4.0.0 [2b948] doesn't provide @babel/core (pfa7cf), requested by @babel/plugin-syntax-jsx
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0013: │ string-hash@npm:1.1.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ styled-jsx@npm:4.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ stylis-rule-sheet@npm:0.0.10 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ stylis@npm:3.5.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ to-fast-properties@npm:2.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0000: └ Completed in 0s 565ms
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed
➤ YN0000: Done with warnings

Expected

No warning in yarn log.

Workaround

Add in .yarnrc.yml:

packageExtensions:
  styled-jsx@*:
    dependencies:
      "@babel/core": "*"
@huozhi
Copy link
Member

huozhi commented Aug 27, 2021

Hi @rtritto , how do you work with styled-jsx inside your app? @babel/core is an expected installed packcage to stay on user side since you also need to change babel config to adopt the plugin from styled-jsx. Can you show more use cases to let us understand better on it? 🙏

@rtritto
Copy link
Author

rtritto commented Aug 27, 2021

I don't use styled-jsx.
I get similar dependency warning when I install Next.js that it has styled-jsx as dependency.

huozhi added a commit that referenced this issue Aug 30, 2021
* Fixes #736

Moving `@babel/core` from devDependencies to dependencies.
Fixes the missing dependency error that comes while installing it through `Yarn 2, Yarn 3`.

Error - 
`
styled-jsx@npm:4.0.0 [78a22] doesn't provide @babel/core (pad17e), requested by @babel/plugin-syntax-jsx
`

* moving babel back to dev deps and adding peerdependencies meta option

* Update package.json

Co-authored-by: Jiachi Liu <inbox@huozhi.im>
@huozhi
Copy link
Member

huozhi commented Aug 31, 2021

Tested the error is gone with next@11.1.2 on my side

@huozhi
Copy link
Member

huozhi commented Jan 19, 2022

Resolved by vercel/next.js#32742 , you can install latest canary (next@12.0.9-canary.2) to get rid of this warning

wroy7860 added a commit to wroy7860/styled-jsx-github-React-and-node that referenced this issue Sep 19, 2022
* Fixes vercel/styled-jsx#736

Moving `@babel/core` from devDependencies to dependencies.
Fixes the missing dependency error that comes while installing it through `Yarn 2, Yarn 3`.

Error - 
`
styled-jsx@npm:4.0.0 [78a22] doesn't provide @babel/core (pad17e), requested by @babel/plugin-syntax-jsx
`

* moving babel back to dev deps and adding peerdependencies meta option

* Update package.json

Co-authored-by: Jiachi Liu <inbox@huozhi.im>
ericbrown2716 added a commit to ericbrown2716/styled-jsx-react-repo that referenced this issue Sep 29, 2022
* Fixes vercel/styled-jsx#736

Moving `@babel/core` from devDependencies to dependencies.
Fixes the missing dependency error that comes while installing it through `Yarn 2, Yarn 3`.

Error - 
`
styled-jsx@npm:4.0.0 [78a22] doesn't provide @babel/core (pad17e), requested by @babel/plugin-syntax-jsx
`

* moving babel back to dev deps and adding peerdependencies meta option

* Update package.json

Co-authored-by: Jiachi Liu <inbox@huozhi.im>
renawolford6 pushed a commit to renawolford6/styled-jsx-development-react-and-node that referenced this issue Oct 6, 2022
* Fixes vercel/styled-jsx#736

Moving `@babel/core` from devDependencies to dependencies.
Fixes the missing dependency error that comes while installing it through `Yarn 2, Yarn 3`.

Error - 
`
styled-jsx@npm:4.0.0 [78a22] doesn't provide @babel/core (pad17e), requested by @babel/plugin-syntax-jsx
`

* moving babel back to dev deps and adding peerdependencies meta option

* Update package.json

Co-authored-by: Jiachi Liu <inbox@huozhi.im>
johnfrench3 pushed a commit to johnfrench3/styled-jsx-Build-React that referenced this issue Nov 2, 2022
* Fixes vercel/styled-jsx#736

Moving `@babel/core` from devDependencies to dependencies.
Fixes the missing dependency error that comes while installing it through `Yarn 2, Yarn 3`.

Error - 
`
styled-jsx@npm:4.0.0 [78a22] doesn't provide @babel/core (pad17e), requested by @babel/plugin-syntax-jsx
`

* moving babel back to dev deps and adding peerdependencies meta option

* Update package.json

Co-authored-by: Jiachi Liu <inbox@huozhi.im>
JiachenSmith pushed a commit to JiachenSmith/styled-jsx that referenced this issue Mar 21, 2023
* Fixes vercel/styled-jsx#736

Moving `@babel/core` from devDependencies to dependencies.
Fixes the missing dependency error that comes while installing it through `Yarn 2, Yarn 3`.

Error - 
`
styled-jsx@npm:4.0.0 [78a22] doesn't provide @babel/core (pad17e), requested by @babel/plugin-syntax-jsx
`

* moving babel back to dev deps and adding peerdependencies meta option

* Update package.json

Co-authored-by: Jiachi Liu <inbox@huozhi.im>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants