Skip to content

Instantly share code, notes, and snippets.

@RidaRidss
Last active May 19, 2021 08:42
Show Gist options
  • Save RidaRidss/b696099e0a5f194890d596584b44c1b5 to your computer and use it in GitHub Desktop.
Save RidaRidss/b696099e0a5f194890d596584b44c1b5 to your computer and use it in GitHub Desktop.
Fix Multiple npm version conflict issue globally in system
--- If you have multiple npm versions globally in system it causes problem in compilation of projects , make sure you have a stable version in your system ---
*** Multiple npm version conflict issue can occur if you took an update when npm update warning comes in terminal while working ***
note : Use nvm globally to manage node versions in system, if you don't have nvm then install nvm first by following step from this gist https://gist.github.com/RidaRidss/165c2ea31c8de1089e22495f315c7247
"Open terminal & run commands"
1. sudo chown -R $(whoami) ~/.npm
2. nvm alias default v12.18.2 (in my case i had to fix this version globally)
3. nvm use v12.18.2
4. nvm use v12.18.2 system
5. sudo npm cache clean --f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment