Fails to install with Yarn 3: "Error: Assertion failed: Expected the root to be registered"
See original GitHub issueI am using Yarn 3.1.1 and on a fresh Docusaurus install, yarn add docusaurus-preset-openapi
yields this error:
Error: Assertion failed: Expected the root to be registered
To reproduce, put this pacakge.json
in an empty directory and run yarn install && yarn add docusaurus-preset-openapi
afterwards:
{
"name": "my-package",
"packageManager": "yarn@3.1.1",
"dependencies": {
"@docusaurus/core": "2.0.0-beta.14",
"@docusaurus/preset-classic": "2.0.0-beta.14",
"@mdx-js/react": "^1.6.21",
"clsx": "^1.1.1",
"prism-react-renderer": "^1.2.1",
"react": "^17.0.1",
"react-dom": "^17.0.1"
}
}
However, it works fine with Yarn 1.22 (a version no longer under active development), if this line is removed:
"packageManager": "yarn@3.1.1",
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Expected the root to be registered when build docusaurus ...
YN0001: │ Error: Assertion failed: Expected the root to be registered at lUe (/Users/chenzili/.node/corepack/yarn/3.1.0/yarn.js:448:4565)
Read more >Error Codes | Yarn - Package Manager
This error means that this process failed and Yarn cannot successfully figure out which version of the package should be added to your...
Read more >Showing error in yarn start command says This package ...
Try running yarn install to install the required packages. If this does not work, try deleting the node_modules folder and run yarn install...
Read more >Repository - GitLab
rootRequester);if(void 0===s)throw new Error("Assertion failed: Expected the root package to have been registered");const a=null!
Read more >Node.js v19.3.0 Documentation
Running npm install -g yarn doesn't work ... Stability: 3 - Legacy. ... A subclass of Error that indicates the failure of an...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you, @bourdakos1! With
2.0.0-beta.13
it does work wonderfully 👍.I was able to get it to install using
"@docusaurus/core": "2.0.0-beta.13"
:I’m guess the issue is because we depend on
"2.0.0-beta.13"
internally?