You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Got those errors during webpack build, using yarn@berry:
Module not found: Error: debug tried to access supports-color (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.
Required package: supports-color (via "supports-color")
Required by: debug@virtual:ef2fb28f3185f9ba345cf0214d372bc8e04344320dd80b839f12ab23fbe300f7c2a62784bfffb92cb431640b461f8eb544464aadcc1823ebefc40d17e8ec16c9#npm:4.1.1 (via /.../.yarn/$$virtual/debug-virtual-be097de51f/0/cache/debug-npm-4.1.1-540248b3aa-3.zip/node_modules/debug/src/node.js)
@ ./.yarn/$$virtual/debug-virtual-be097de51f/0/cache/debug-npm-4.1.1-540248b3aa-3.zip/node_modules/debug/src/node.js
@ ./.yarn/$$virtual/debug-virtual-be097de51f/0/cache/debug-npm-4.1.1-540248b3aa-3.zip/node_modules/debug/src/index.js
@ ./.yarn/cache/esx-npm-2.3.3-0851126841-3.zip/node_modules/esx/index.js
The text was updated successfully, but these errors were encountered:
You can find more info on the .yarnrc.yml file here: https://yarnpkg.com/configuration/yarnrc#packageExtensions
Essentially the packageExtensions of .yarnrc gives you a way to override the dependencies of packages.
In this case the problem is that debug declares supports-color as a peer-dependency rather than a dependency.
If I understand this correctly, the authors of the debug package actually intended to make supports-color an optional peer dependency, so the correct override is:
Got those errors during webpack build, using yarn@berry:
The text was updated successfully, but these errors were encountered: