question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if youā€™re still stuck at the end, weā€™re happy to hop on a call to see how we can help out.

Non declared dependencies throwing errors in Yarn v2 (berry)

See original GitHub issue

šŸ› Bug Report

Attempting to use Docusaurus v2 with Yarn v2 (berry). As soon as i run yarn build the build explodes with dependency errors from yarn v2.

Lots of peer dependencies arenā€™t specified and yarn v2 doesnā€™t know what to do.

Example error

Error: @docusaurus/core tried to access @docusaurus/plugin-content-blog, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Interesting that this doesnā€™t happen in yarn v1, but it seems to be due to no dependencies/peer dependencies being specified for the various docusaurus packages.

Steps to reproduce

  • Install/have yarn v2 as the package manager for project
  • Install docusaurus v2
  • run yarn build.

Iā€™ve tried to install every dependency yarn says it canā€™t find, but itā€™s an endless process, and i still havenā€™t managed to get a build to work.

Basically, right now, docusaurus v2 is not compatible with yarn v2 šŸ˜¢

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
arrowplumcommented, Sep 7, 2021

@slorber this is an old issue but I just came across it.

Error: @docusaurus/core tried to access @docusaurus/mdx-loader, but it isnā€™t declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: @docusaurus/mdx-loader

1reaction
slorbercommented, Nov 23, 2020

We are going to release very soon, let me know tomorrow afternoon if you still have issues with latest version, or if we can close this issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Codes | Yarn - Package Manager
A file from the cache has been detected unused while installing dependencies. Running yarn cache clean will cause Yarn to remove everything inside...
Read more >
Newest 'yarnpkg-v2' Questions - Stack Overflow
I need to get a list of only prod dependencies with yarn 3. Could not find any option in official documentation for listing...
Read more >
Introducing Yarn 2 ! - DEV Community ā€ ā€
Together with the resolutions field, you can even patch a package located deep within your dependency tree. And since the patch: protocol isĀ ......
Read more >
With the addition of workspaces and yarn.lock support to npm ...
Yarn v2 PnP is simply a lifesaver if you have a medium+ sized monorepo. ... Starting up the app caused some thrown errors...
Read more >
Advanced package manager features for npm, Yarn, and pnpm
When using the default configuration, pnpm and Yarn Berry do not use the same dependency resolution algorithms as npm and Yarn Classic,Ā ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found