Home > Mobile >  What if an app(nodejs) is installed paralell with Chocolatey and npm?
What if an app(nodejs) is installed paralell with Chocolatey and npm?

Time:10-30

I found that if I issue the command node -v in the VisualCode terminal in Windows, I get the following response:

v16.14.0

However, if I issue the choco list --localonly command, this is also included:

nodejs-lts 14.18.1

So does that mean it's double installed? And which one actually runs on the machine? Can one be removed because it is redundant and won't harm the other installation?

CodePudding user response:

  • Yes, there are two node binaries (with different versions) on your machine.
  • The one you got when you ran node -v (16.14.0) is the one currently being used.
  • You can remove the other one if you wanted to, but the reason why such version management exists is sometimes node projects only work with certain node versions.

If you are in the future trying to test out your project with a older node version, another stackoverflow answer recommended npx -p [email protected] -- node -v

  • Related