-
Notifications
You must be signed in to change notification settings - Fork 30
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
@zooniverse/react-components now requires d3 to be installed #5979
Comments
It looks like the following definitely works:
But I can't figure out how to get |
So I think you’ll need to add |
I tried to import |
I think I ran into something similar with the data-plotting components. The older components in the monorepo were built before |
The |
Package
Choose from the list:
Describe the bug
The
AnimatedNumber
component usesd3
.@zooniverse/react-components
doesn't included3
as a dependency.To Reproduce
npm install @zooniverse/react-components
in a project that doesn't used3
.Expected behavior
@zooniverse/react-components
should install without errors, or warn thatd3
is a prerequisite.Additional context
Either
yarn add d3
or add it as a peer dependency (yarn add d3 --peer
.)d3
is modular now, so I'd also recommend only adding the modules that are used by theAnimatedNumber
component.Importing directly from
d3
may also cause version conflicts with@visx
packages (see #5324.) Where possible, I recommend importing d3 modules from@visx/vendor
eg.front-end-monorepo/packages/lib-react-components/src/Media/components/Data/components/DataSeriesPlot/helpers/utils.js
Line 2 in 875fc77
The text was updated successfully, but these errors were encountered: