[Fixed] Should I install Angular for every Node version?

Issue

I have a problem when switching from a Node.js version to another one (with the command nvm use nodeVersion).

For example when I use node 12.0.0, that I already used to develop a little application, I’m able to run the command ng version.
If I switch, for example, to node 12.11.0, when I run the command ng version I get the error bash: /c/Program Files/nodejs/ng: No such file or directory.

This makes me think that I have to re-install Angular for every version of Node I use, doing something like this:

  1. nvm use nodeVersion
  2. npm install -g @angular/cli version

Am I right? Or there is something I didn’t get?

Thank you.

Solution

each node version has each library folder, so you need to install what you want for each node version because some libraries are depending on the node version.

I recommend you if you are using windows 10, Install Ubuntu Terminal from Microsoft Store, It can solves many problems

Leave a Reply

(*) Required, Your email will not be published