Closed blaxk closed 1 year ago
I switched to pnpm and the workspace protocol is the recommendation for monorepos, although [it should be replaced eventually according to the doc, it might be due to lerna.
That's a pretty big issue, I'll try to release a new version without this issue asap, for now please stick with your current version.
So it does update the main dependencies with proper versions:
"dependencies": {
"@nivo/scales": "0.82.0",
"@react-spring/web": "9.4.5 || ^9.7.2",
"@types/d3-format": "^1.4.1",
"@types/d3-time-format": "^2.3.1",
"@types/prop-types": "^15.7.2",
"d3-format": "^1.4.4",
"d3-time-format": "^3.0.0",
"prop-types": "^15.7.2"
},
But the peer dependencies still use the workspace
protocol:
"peerDependencies": {
"@nivo/core": "workspace:*",
"react": ">= 16.14.0 < 19.0.0"
},
I need to see if lerna mentions anything about this.
Opened an issue on lerna
.
I was able to get around this with the --legacy-peer-deps
flag.
Thank you for sharing this @wheresvic.
@plouc hello, I'm the maintainer of Lerna-Lite I prefer to write you directly here since it's probably better not to promote Lerna forks in Lerna directly, so anyway... Lerna-Lite does support bumping peer deps but under a flag (version#--allow-peer-dependencies-update) since by default peer deps should in theory never be updated unless explicitly wanting to (hence the flag). Also note that I pushed a fix in Lerna-Lite for an issue reported with workspace:^
in peer deps, I'll release a new version tonight, so it might be better to wait tomorrow if you ever want to give it a try
I also replied to your Lerna issue by mentioning why Lerna does not yet support this feature.
Just wanted to provide more info and possible alternative... cheers
I managed to install this package by selecting the previous version npm i @nivo/core@^0.81.0
.
@ghiscoding, thank you for reaching out, and for the reply on the lerna issue I opened! I might give it a try.
Actually, maybe for now I'll move @nivo/core
to a regular dependency
, the only benefit is to prevent potential duplication, but on the other hand, all other core dependencies (@nivo/tooltip
, @nivo/scales
, @nivo/axes
...) are currently expressed as regular ones.
The current approach also comes with some limitations, it means that you need to have all versions strictly aligned, which might be an issue for users who cannot/don't want to upgrade all charts at once.
With this new approach, they could, at the expense of a bigger bundle size though.
@nivo/core
is not like other peer dependencies such as React or babel, where only one version should exist, it's OK to have several versions (but will affect the resulting bundle size).
Happened to me as well. We only have one component using nivo so we just downgraded the version and it works
npm i @nivo/core@0.80.0 @nivo/pie@0.80.0
Same issue after bumping version from 0.81.0 to 0.82.1
$ node -v
v18.16.0
$ npm -v
9.5.1
$ npm ci --cache .npm --prefer-offline
npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "workspace:": workspace:*
npm ERR! A complete log of this run can be found in:
Moved @nivo/core
as a regular dependency.
I was using the v0.80.0 version without problems. But while trying to install version v0.82.0 I got an error.
package.json