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

Problem with dependency tree with npm 7 #19

Closed
seblejeune opened this issue Jul 12, 2021 · 6 comments · Fixed by #23
Closed

Problem with dependency tree with npm 7 #19

seblejeune opened this issue Jul 12, 2021 · 6 comments · Fixed by #23

Comments

@seblejeune
Copy link

Hi,

I use npm 7, docusaurus 2.0.0-beta and your docusaurus-plugin-sass.

I have a problem with the peer dependencies. Actually you set "@docusaurus/core": "^2.0.0" but npm 7 does not install pre-release dependencies with a '^'.

This possible for you to change and put >2.0.0-beta by example ?

As long as the release version of docusaurus hasn't officially been released.

This my stack trace when I install your plugin :

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: frontend-documentation@0.0.0
npm ERR! Found: @docusaurus/[email protected]
npm ERR! node_modules/@docusaurus/core
npm ERR!   @docusaurus/core@"^2.0.0-beta.ff31de0ff" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @docusaurus/core@"^2.0.0" from docusaurus-plugin-sass@0.2.1
npm ERR! node_modules/docusaurus-plugin-sass
npm ERR!   docusaurus-plugin-sass@"*" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /home/lejes/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/lejes/.npm/_logs/2021-07-12T15_37_39_084Z-debug.log

node version : v14.17.2
npm version : 7.19.1

Thanks

@TranXuanHoang
Copy link

I got the same installation error when upgrading the version of Docusaurus. It would be great if we could fix the bug.

npm install --save docusaurus-plugin-sass sass 
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @docusaurus/[email protected]
npm ERR! node_modules/@docusaurus/core
npm ERR!   @docusaurus/core@"2.0.0-beta.6" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @docusaurus/core@"^2.0.0" from [email protected]
npm ERR! node_modules/docusaurus-plugin-sass
npm ERR!   docusaurus-plugin-sass@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

@docusaurus/core: 2.0.0-beta.6
node version : v16.8.0
npm version : 7.21.0

Thanks!

@JohannesZahn
Copy link

I have the same issue. With docusaurus version 2.0.0-beta.3 everything works fine but we'd like to upgrade to beta.6

@cstipkovic
Copy link

I got the same issue here.
I did test with @docusaurus/core@"2.0.0" and @docusaurus/core@"2.0.0-beta.6", and the dependency problem is the same.

@cstipkovic
Copy link

I made another test and if I try using yarn, the problem of dependency not happens, but I need to install sass module before run yarn/npm start, because it's not installing the peerDependency for sass-1.30.0.

If I add sass module after run yarn install, it runs and load right.

@JanCizmar
Copy link

+1

@homotechsual
Copy link

For now you can get this to install using npm install --save docusaurus-plugin-sass sass --legacy-peer-deps

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.

6 participants