-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
0.79 regression: Yarn 3 berry errors with @nivo/legends dependencies (d3-scale and @nivo/colors) #1951
Comments
This is related to #1941 but with added details - I'm ok if you want to close this in favor of that ticket. |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
Bump |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you! |
bump |
I'm trying to address this issue in #2313. |
Describe/explain the bug
Using
@nivo/legends
in a project with Webpack and Yarn 3 berry results in these errors in@nivo/legends
:ModuleNotFoundError: Module not found: Error: Can't resolve '@nivo/colors'...
...@nivo/legends tried to access @nivo/colors, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
ModuleNotFoundError: Module not found: Error: Can't resolve 'd3-scale'...
...@nivo/legends tried to access d3-scale, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
I'm able to compile without errors in the previous version 0.78. It looks like as of 0.79,
d3-scale
and@nivo/colors
are now being used in the code. These two dependencies have been added to devDependencies but since they run in production they should instead be added todependencies
, which will clear up the Yarn/Webpack error. I was able to confirm this by adding a temporary YarnpackageExtensions
workaround in.yarnrc.yml
:Adding this and then rerunning
yarn
works as a temporary workaround.To Reproduce
Create a new project using Yarn 3 and Webpack 5. Use a Nivo Bar chart that uses a legend and then try to compile the project. In the case above I'm using Storybook, which uses Webpack 5 under the hood.
Expected behavior
I expect Webpack to compile without errors.
Screenshots
Full error:
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: