node version displayed does not match the actual version.
After I switched to a higher version of node, when I switched back to a lower version, it showed that the change was effective, but in reality, it did not take effect and I am still on the higher version of node.
Are you facing this issue with pnpm specifically? https://github.com/volta-cli/volta/issues/1743#issuecomment-2096122673 might help.
When I run node -v it shows me the version I switched to. But previously, running pnpm node -v would show me a different version.
Are you facing this issue with
pnpmspecifically? #1743 (comment) might help.When I run
node -vit shows me the version I switched to. But previously, runningpnpm node -vwould show me a different version.
Indeed, when I use 'pnpm node -v', it shows a different version, but this is not the issue I described. When I use 'node -v', it shows that my node version is v20.16.0, while 'pnpm node -v' shows that my node version is v18.19.0. However, the actual version I should be using should be higher than v20.16.0. I don't know if you can understand my description.
It sounds like the same problem I had where the Node version I've set with Volta is not the same as what pnpm uses. Try adding this to your shell profile, restart, and see if it helps:
# volta
export VOLTA_FEATURE_PNPM=1
It sounds like the same problem I had where the Node version I've set with Volta is not the same as what pnpm uses. Try adding this to your shell profile, restart, and see if it helps:
volta
export VOLTA_FEATURE_PNPM=1
I'm sorry, I tried your method but it seems it didn't solve my problem. My current node version is v20.16.0, and when using yarn to download, it's not compatible with plugins for this version, yet I can still download successfully. I don't know what the situation is.
It sounds like the same problem I had where the Node version I've set with Volta is not the same as what pnpm uses. Try adding this to your shell profile, restart, and see if it helps:
volta
export VOLTA_FEATURE_PNPM=1
I'm sorry, I tried your method but it seems it didn't solve my problem. My current node version is v20.16.0, and when using yarn to download, it's not compatible with plugins for this version, yet I can still download successfully. I don't know what the situation is.
I see. Perhaps there's an incompatibility between Volta and Yarn which causes Yarn to use the wrong Node version.
A really annoying temporary workaround is to uninstall Volta and reinstall it. Yarn should then use the first Node version that you install. But you have to keep doing this to change version if you really need to use Volta
It sounds like the same problem I had where the Node version I've set with Volta is not the same as what pnpm uses. Try adding this to your shell profile, restart, and see if it helps:
volta
export VOLTA_FEATURE_PNPM=1
I'm sorry, I tried your method but it seems it didn't solve my problem. My current node version is v20.16.0, and when using yarn to download, it's not compatible with plugins for this version, yet I can still download successfully. I don't know what the situation is.
I see. Perhaps there's an incompatibility between Volta and Yarn which causes Yarn to use the wrong Node version.
A really annoying temporary workaround is to uninstall Volta and reinstall it. Yarn should then use the first Node version that you install. But you have to keep doing this to change version if you really need to use Volta
It is indeed a headache, and uninstalling the high version of node using volta was unsuccessful; it seems I can only uninstall volta.