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

Can't NPM Install with 2.0.0-beta.10 #6079

Closed
6 of 7 tasks
retiutut opened this issue Dec 9, 2021 · 7 comments
Closed
6 of 7 tasks

Can't NPM Install with 2.0.0-beta.10 #6079

retiutut opened this issue Dec 9, 2021 · 7 comments
Labels
bug An error in the Docusaurus core causing instability or issues with its execution

Comments

@retiutut
Copy link

retiutut commented Dec 9, 2021

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

Getting an error trying to update to Docusaurus 2.0.0-beta.10.

Steps to reproduce

Simply update dependency in package.json to 2.0.0-beta.10 for core and preset-classic.

Replicated in CodeSandbox by changing package.json only.

Expected behavior

npm install without errors.

Actual behavior

^CiMac:website Richard$ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: undefined@undefined
npm ERR! Found: @docusaurus/core@2.0.0-beta.10
npm ERR! node_modules/@docusaurus/core
npm ERR!   @docusaurus/core@"2.0.0-beta.10" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @docusaurus/core@"2.0.0-beta.9" from @docusaurus/preset-classic@2.0.0-beta.10
npm ERR! node_modules/@docusaurus/preset-classic
npm ERR!   @docusaurus/preset-classic@"2.0.0-beta.10" 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 /Users/Richard/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/Richard/.npm/_logs/2021-12-09T16_51_13_932Z-debug.log

Your environment

  • Public source code: n/a
  • Public site URL: n/a
  • Docusaurus version used: 2.0.0-beta.10
  • Environment name and version (e.g. Chrome 89, Node.js 16.4): Node 16.11.1
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS): Github Actions Ubuntu, Mac, and CodeSandbox

Reproducible demo

https://codesandbox.io/s/currying-wood-6k246

Self-service

  • I'd be willing to fix this bug myself.
@retiutut retiutut added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Dec 9, 2021
@ericvicenti
Copy link
Contributor

I can confirm that the initial Docusaurus setup is broken right now with this issue.

On my computer I run npx create-docusaurus@latest dcrs-test1 classic

And the following is output:

Creating new Docusaurus project...

Installing dependencies with npm...
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: dcrs-test-1@0.0.0
npm ERR! Found: @docusaurus/core@2.0.0-beta.10
npm ERR! node_modules/@docusaurus/core
npm ERR!   @docusaurus/core@"2.0.0-beta.10" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @docusaurus/core@"2.0.0-beta.9" from @docusaurus/preset-classic@2.0.0-beta.10
npm ERR! node_modules/@docusaurus/preset-classic
npm ERR!   @docusaurus/preset-classic@"2.0.0-beta.10" 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 /Users/ericvicenti/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/ericvicenti/.npm/_logs/2021-12-09T18_32_53_120Z-debug.log


Successfully created "dcrs-test1".
<the success/intro message is here, even though there was an npm error on install>

@ericvicenti
Copy link
Contributor

@slorber, not sure what is happening here. Maybe something didn't go smoothly with today's release?

@ericvicenti
Copy link
Contributor

Oh I think this is the fix: #6078

@Josh-Cena
Copy link
Collaborator

Josh-Cena commented Dec 9, 2021

Hi, we had been aware of this: #6047 (comment)

We'll discuss what's the best fix for this, probably reverting the change and move the core back to hard dependency.

In the meantime, please do:

rm -rf node_modules package-lock.json
npm install --legacy-peer-deps

to ignore the bad peer dependency range. You will still get warnings, but things should work. Please report below if that workaround still doesn't work.

@Josh-Cena Josh-Cena removed the status: needs triage This issue has not been triaged by maintainers label Dec 9, 2021
@retiutut
Copy link
Author

retiutut commented Dec 10, 2021

@Josh-Cena why is this closed with just presenting a workaround? Can this please be fixed for real?

I understand this is a beta release but it should be able to be installed without major errors.

@slorber
Copy link
Collaborator

slorber commented Dec 10, 2021

@retiutut this is already fixed for real, use beta.13 it should work now

@retiutut
Copy link
Author

@slorber Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution
Projects
None yet
Development

No branches or pull requests

4 participants