Open nifr opened 11 months ago
Also hitting this with pnpm 8.9+ and volta (yes VOLTA_FEATURE_PNPM=1
is set)
+1 and I cannot uninstall Node that volta installed
I can't reproduce with steps that OP posted. I may be able to take this issue on but I need a certainly reproducible way to reproduce.
volta install node@20.8.1
volta install pnpm@8.9.2
volta install node@21.0.0
volta pin node@21.0.0
volta pin pnpm@8.9.2
pnpm run dev
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "node index.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"volta": {
"node": "21.0.0",
"pnpm": "8.9.2"
}
}
VOLTA_FEATURE_PNPM=1
I got this working with this export:
❯ pnpm install WARN Unsupported engine: wanted: {"node":">=18"} (current: {"node":"v16.20.0","pnpm":"8.6.2"}) Lockfile is up to date, resolution step is skipped Already up to date
datree@0.0.1 prepare /Users/theo.despoudis/Workspace/datree husky install
husky - Git hooks installed Done in 1.2s ❯ export VOLTA_FEATURE_PNPM=1 ❯ pnpm install Lockfile is up to date, resolution step is skipped Already up to date
datree@0.0.1 prepare /Users/theo.despoudis/Workspace/datree husky install
husky - Git hooks installed Done in 1.1s
I also experience the same issue with the pnpm@7.33.6
and volta@1.0.5
.
The project has declared the node@18.12.1
, shown in the picture below, with node -v
.
While executing the pnpm node -v
, the node version used was node@18.19.0
, which was the node version used when installing the pnpm
.
Let's say we run the NextJS project with the pnpm dev
; then the node version is attached to the pnpm
, not the one declared in the project itself.
I have also tried adding the global environment variable stated in https://docs.volta.sh/advanced/pnpm; it looks like the feature is still experimental.
I would appreciate it if someone could help with this issue; thank you!
I also experience the same issue with the
pnpm@7.33.6
andvolta@1.0.5
.The project has declared the
node@18.12.1
, shown in the picture below, withnode -v
. While executing thepnpm node -v
, the node version used wasnode@18.19.0
, which was the node version used when installing thepnpm
.Let's say we run the NextJS project with the
pnpm dev
; then the node version is attached to thepnpm
, not the one declared in the project itself.I have also tried adding the global environment variable stated in https://docs.volta.sh/advanced/pnpm; it looks like the feature is still experimental.
I would appreciate it if someone could help with this issue; thank you!
You are using volta v1.0.5 while the VOLTA_FEATURE_PNPM
feature support was introduced in Volta v1.1.1...
I also experience the same issue with the
pnpm@7.33.6
andvolta@1.0.5
. The project has declared thenode@18.12.1
, shown in the picture below, withnode -v
. While executing thepnpm node -v
, the node version used wasnode@18.19.0
, which was the node version used when installing thepnpm
. Let's say we run the NextJS project with thepnpm dev
; then the node version is attached to thepnpm
, not the one declared in the project itself. I have also tried adding the global environment variable stated in https://docs.volta.sh/advanced/pnpm; it looks like the feature is still experimental. I would appreciate it if someone could help with this issue; thank you!You are using volta v1.0.5 while the
VOLTA_FEATURE_PNPM
feature support was introduced in Volta v1.1.1...
You are right, @chawyehsu, thank you. The docs should have mentioned the minimum version of the Volta itself.
I had the same issue even with Volta v1.1.1
and VOLTA_FEATURE_PNPM
flag enabled, but managed to fix it by uninstalling pnpm
and installing it again while node 20.11.0 was pinned.
So just:
volta uninstall pnpm
volta pin node@20.11.0
( or volta install node@20.11.0
to have it as a default node version )
volta install pnpm
And now this command finally tells me that pnpm uses my desired node version:
pnpm node --version
> 20.11.0
Seeing this too. The uninstall/reinstall workaround works for me.
Given volta's active node version is i.e.
v20.8.1
When I installpnpm
withvolta
And I install and pin a different node version i.e.v21.0.0
Thenpnpm
still uses the previousnode
versionv20.8.1
Steps to reproduce:
With
package.json
containing:The following warning appears and reveals that the incorrect
node
version is used under the hood: