Tools, FAQ, Tutorials:
Reinstall npm with Node Version Manager
How to reinstall npm with a node version manager? I am getting permission errors with the current version of npm.
✍: FYIcenter.com
If you are get directory and file permission error when using the
"npm install" command, you should follow this tutorial
to reinstall "node" and "npm" with the "nvm" Node Version Manager.
1. Check the current version of "node" and "npm":
$ node -v v8.10.0 $ npm -v 6.9.0
2. Download nvm install script and run it:
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh > install.sh $ chmod 700 install.sh $ sudo ./install.sh
3. Load nvm.sh as nvm command:
$ export NVM_DIR="$HOME/.nvm" $ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm $ [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" $ nvm --version 0.34.0
4. Reinstall "node", including "npm", with "nvm":
$ nvm install node Downloading and installing node v11.14.0... Downloading https://nodejs.org/dist/v11.14.0/node-v11.14.0-linux-x64.tar.xz... ######################################################################### 100.0% Computing checksum with sha256sum Checksums matched! Now using node v11.14.0 (npm v6.7.0) Creating default alias: default -> node (-> v11.14.0)
4. Check the version of "node" and "npm" again:
$ node -v v11.14.0 $ npm -v 6.7.0
Â
⇒ Reinstall Node.js Required Modules
⇠Setup Node.js for WYFA Tests
⇑ WYFA (Writing Your First Application)
⇑⇑ Hyperledger Tutorials
2020-01-04, 1614👍, 0💬
Popular Posts:
How to login to Azure API Management Publisher Portal 2017 version? If you have given access permiss...
How to login to Azure API Management Publisher Dashboard? If you have given access permission to an ...
Where to get the detailed description of the JSON.stringify() Function in JavaScript? Here is the de...
How To Read a File in Binary Mode in PHP? If you have a file that stores binary data, like an execut...
Where to find tutorials on JSON (JavaScript Object Notation) text string format? I want to know how ...