Created
April 22, 2024 01:46
-
-
Save denihida1216/aa3eb40cab2b06de4ef604bbef392e8c to your computer and use it in GitHub Desktop.
Npm can't find module "semver" error in Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node* ~/.npm | |
sudo rm -rf /usr/local/lib/node* | |
sudo rm -rf /usr/local/bin/node* | |
sudo rm -rf /usr/local/include/node* | |
sudo apt-get purge nodejs npm | |
sudo apt autoremove | |
sudo apt-get install nodejs npm | |
sudo apt install -y npm | |
sudo npm install -g n | |
sudo n stable | |
hash -r | |
npm --version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment