Install npm locally - specific to a certain project
In some scenarios, we would like to use a specific version of npm (Node Package Manager) for the compatibility reasons. Let's explore how to install a separate version of npm
First, enter into a specific folder, for example: gww, then execute the following command in the cmd window opened inside this folder:
npm install npm@6.14.15
After the specific version has been installed, use the following command to use the specific version of npm:
npx npm -v
Optionally, we can also use:
.\node_modules\.bin\npm -v
Then we could use this specific version of npm, for example:
npx npm run serve
Or optionally we can also use:
.\node_modules\.bin\npm run serve