I have an issue with npm. It tries to install node version 14.21.3 which i was using before for other projects even though I choose version 20.17 using command nvm use 20.17
.
I uninstalled npm and node with clearing all the modules. I cleared all versions from .nvm/versions/node/v20.17.0/bin/node
Here is screen with error message.
2
Answers
Try uninstalling nodejs and installing
It seems you have an old version of node on your system, which wasn’t installed by nvm (but probably the package manager if your system). And this version seems to be the first one to be found in your path.
Use
which node
to find the respective executable and try to get rid of this version. As you seem to be on Ubuntu you could tryWhich should remove a nodejs/npm installed by apt. If that doesn’t uninstall anything, you have to investigate further where the old node version comes from