Closed p45mark closed 3 years ago
Had the same issue. Added @nivo/core
as a dependency to fix it.
It is a peer dependency on all of the packages to prevent cyclical dependencies between core and tooltip. So like orhels mentions, you need to specify it in your dependencies now.
Yes, updating the documentation/readme would be a step in the right direction. :)
@wyze Note that the peer dependency is set to 0.64.0 for some of the packages. Checked the ones I use (annotations, axes, bar, colors, legends, pie and tooltip) and all has 0.64.0 as a peer dependency. When testing pie with core 0.64.0 in code sandbox the app crashes https://codesandbox.io/s/nivo-core-required-forked-gdd1x.
Yup, we need to fix that with lerna, it isn't bumping peer dependencies correctly.
It's been fixed with 0.65.1
for charts, which now point to @nivo/core@0.65.0
.
We also added some install instructions in the generated code snippet on the website.
So just to make sure I get it right, we now have to explicitly specify @nivo/core@^0.65.0
in package.json
for v0.65.x
(perhaps also in future versions)?
@matthewkwong2 Correct. You should bump @nivo/core dependency when you bump your other packages as well.
Well, I think you should really mention this in the release note (or maybe make it more obvious if it is mentioned somewhere). This is a breaking change.
@matthewkwong2, it is now indicated in the generated code snippet, also when you install, you'll get warnings about required versions.
This was already the case for a few package before the latest release, but the main difference is that the version defined in peerDependencies
is now correct.
@plouc are you sure ? Because I'm doing this, but it doesn't seems to work, because peerDependencies are still not on the same level.
"@nivo/core": "0.65.1",
"@nivo/bar": "0.65.1",
"@nivo/funnel": "0.65.1",
"@nivo/pie": "0.65.1",
"@nivo/sankey": "0.65.1",
"@nivo/stream": "0.65.1",
@arthuryeti In this case, there were no changes detected in core
so it is still on 0.65.0
which is the same version the peerDependency is in the chart packages.
@wyze I think the core
should be updated, because right now it depends on @nivo/tooltip@0.63.0
which break the npm install
@arthuryeti, you're right, we didn't consider this other peer dependency.
We might want to make the script a bit more generic @wyze.
Done in #1293.
Describe/explain the bug After upgrading the Pie and Line charts to version 0.65.0 I'm getting the error
Module not found: Can't resolve '@nivo/core'
To Reproduce In this codesandbox just bump the version of
@nivo/pie
to0.65.0
to see the error https://codesandbox.io/s/nivo-core-required-zk09f?file=/src/App.jsSteps to reproduce the behavior:
Desktop (please complete the following information):
Additional context Maybe we just need to update the documentation if
@nivo/core
is required now