node.jsshellnvm

How to change Node.js version with nvm


I'm using Yeoman to create a project. When I try to use Gulp.js I run the command gulp serve. An error tells me that I need an older version of Node.js (8.9.4), knowing that I've installed the latest version (10.14.1).

So I installed nvm to change the Node.js version. I had to set it into path C:\, and then I run with success: nvm install 8.9.4. And when I try to use it, nvm use 8.9.4, it’s always the latest version that is used:

Enter image description here

If I try to use 8.10.0 and then run node -v, it tells me access refused, and the same to any Node.js command.


Solution

  • nvm install 8.10.0 is for installing proposed node version locally.

    In order to use it:

    nvm use 8.10.0
    

    Note that you need to run this command as administrator.

    You can always set default Node.js version:

    nvm alias default 8.10.0