Project broken on Yarn v2
See original GitHub issue🐛 Bug Report
When on Yarn 2, I get this error when trying to run yarn start
:
/workspace/Cherry/website/.pnp.js:28332
throw firstError;
^
Error: A package is trying to access another package without the second one being listed as a dependency of the first one
Required package: @babel/runtime (via "@babel/runtime/helpers/interopRequireDefault")
Required by: react-loadable-ssr-addon@virtual:ebd7b9259ecd2093755e637a1fd861d705df40e70f047e72ef912a060f6f8b0d7d8b754ceeb087469fa51421c9654efe3ad7ba9d5fbe846f41f5175c740dcb64#npm:0.2.3 (via /workspace/Cherry/website/.yarn/$$virtual/react-loadable-ssr-addon-virtual-3a33825c47/0/cache/react-loadable-ssr-addon-npm-0.2.3-26d8c8d441-1.zip/node_modules/react-loadable-ssr-addon/lib/)
Require stack:
- /workspace/Cherry/website/.yarn/$$virtual/react-loadable-ssr-addon-virtual-3a33825c47/0/cache/react-loadable-ssr-addon-npm-0.2.3-26d8c8d441-1.zip/node_modules/react-loadable-ssr-addon/lib/index.js
- /workspace/Cherry/website/.yarn/$$virtual/@docusaurus-core-virtual-ebd7b9259e/0/cache/@docusaurus-core-npm-2.0.0-alpha.58-2f04b5f6f0-1.zip/node_modules/@docusaurus/core/lib/commands/build.js
- /workspace/Cherry/website/.yarn/$$virtual/@docusaurus-core-virtual-ebd7b9259e/0/cache/@docusaurus-core-npm-2.0.0-alpha.58-2f04b5f6f0-1.zip/node_modules/@docusaurus/core/lib/index.js
- /workspace/Cherry/website/.yarn/$$virtual/@docusaurus-core-virtual-ebd7b9259e/0/cache/@docusaurus-core-npm-2.0.0-alpha.58-2f04b5f6f0-1.zip/node_modules/@docusaurus/core/bin/docusaurus.js
at Object.makeError (/workspace/Cherry/website/.pnp.js:20077:24)
at resolveToUnqualified (/workspace/Cherry/website/.pnp.js:28940:35)
at resolveRequest (/workspace/Cherry/website/.pnp.js:29017:27)
at Object.resolveRequest (/workspace/Cherry/website/.pnp.js:29085:26)
at Function.module_1.Module._resolveFilename (/workspace/Cherry/website/.pnp.js:28315:34)
at Function.module_1.Module._load (/workspace/Cherry/website/.pnp.js:28200:40)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/workspace/Cherry/website/.yarn/$$virtual/react-loadable-ssr-addon-virtual-3a33825c47/0/cache/react-loadable-ssr-addon-npm-0.2.3-26d8c8d441-1.zip/node_modules/react-loadable-ssr-addon/lib/index.js:3:30)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.module_1.Module._load (/workspace/Cherry/website/.pnp.js:28230:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/workspace/Cherry/website/.yarn/$$virtual/@docusaurus-core-virtual-ebd7b9259e/0/cache/@docusaurus-core-npm-2.0.0-alpha.58-2f04b5f6f0-1.zip/node_modules/@docusaurus/core/lib/commands/build.js:16:52) {
code: 'MODULE_NOT_FOUND',
pnpCode: 'UNDECLARED_DEPENDENCY',
data: {
request: '@babel/runtime/helpers/interopRequireDefault',
issuer: '/workspace/Cherry/website/.yarn/$$virtual/react-loadable-ssr-addon-virtual-3a33825c47/0/cache/react-loadable-ssr-addon-npm-0.2.3-26d8c8d441-1.zip/node_modules/react-loadable-ssr-addon/lib/',
issuerLocator: {
name: 'react-loadable-ssr-addon',
reference: 'virtual:ebd7b9259ecd2093755e637a1fd861d705df40e70f047e72ef912a060f6f8b0d7d8b754ceeb087469fa51421c9654efe3ad7ba9d5fbe846f41f5175c740dcb64#npm:0.2.3'
},
dependencyName: '@babel/runtime',
candidates: [ 'react-loadable-ssr-addon', 'react-loadable', 'webpack' ]
},
requireStack: [
'/workspace/Cherry/website/.yarn/$$virtual/react-loadable-ssr-addon-virtual-3a33825c47/0/cache/react-loadable-ssr-addon-npm-0.2.3-26d8c8d441-1.zip/node_modules/react-loadable-ssr-addon/lib/index.js',
'/workspace/Cherry/website/.yarn/$$virtual/@docusaurus-core-virtual-ebd7b9259e/0/cache/@docusaurus-core-npm-2.0.0-alpha.58-2f04b5f6f0-1.zip/node_modules/@docusaurus/core/lib/commands/build.js',
'/workspace/Cherry/website/.yarn/$$virtual/@docusaurus-core-virtual-ebd7b9259e/0/cache/@docusaurus-core-npm-2.0.0-alpha.58-2f04b5f6f0-1.zip/node_modules/@docusaurus/core/lib/index.js',
'/workspace/Cherry/website/.yarn/$$virtual/@docusaurus-core-virtual-ebd7b9259e/0/cache/@docusaurus-core-npm-2.0.0-alpha.58-2f04b5f6f0-1.zip/node_modules/@docusaurus/core/bin/docusaurus.js'
]
}
Have you read the Contributing Guidelines on issues?
Yup
To Reproduce
Create D2 project with Yarn 2, then run yarn start
Expected behavior
It starts
Actual Behavior
See stacktrace above
Your Environment
- Docusaurus version used: v2 beta (latest)
- Environment name and version (e.g. Chrome 78.0.3904.108, Node.js 10.17.0): Node 12.18.1 on Linux
- Operating system and version (desktop or mobile): Gitpod
Reproducible Demo
(Paste the link to an example repo, including a siteConfig.js
, and exact instructions to reproduce the issue.)
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
Migration | Yarn - Package Manager
Any major release has its breaking changes, and Yarn 2 isn't the exception. A few old behaviors were cleaned, fixed, modified, or removed....
Read more >yarn 2 upgrade appears to have broke typescript types, where ...
I have been trying to upgrade a typescript monorepo to make use of yarn 2 but am running into an issue where typescript...
Read more >What's the problem with Yarn 2? - Nicholas Martin
Yarn 2 makes a bold step in fixing the node ecosystem, ... that rely heavily on the node_modules structure, projects like React Native....
Read more >yarn-audit-fix - npm
The missing `yarn audit fix`. Latest version: 9.3.7, last published: 2 months ago. Start using yarn-audit-fix in your project by running ...
Read more >Yarn 2 the new Package Manager | Blake Rogan
So the new version of Yarn broke your project. It was broken anyway. Yarn just made you fix it.
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
react-loadable-ssr-addon
Closing, will be in next v2 release