Last active
March 3, 2023 11:06
-
-
Save joekolade/6fbf847ed4b634868385 to your computer and use it in GitHub Desktop.
[Install clean npm on mac] #mac #shell
This file contains 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
ls -1 /usr/local/node_modules > ~/node_modules.txt | |
rm -rf /usr/local/lib/node_modules | |
brew uninstall node | |
brew install node --without-npm | |
echo prefix=~/.node >> ~/.npmrc | |
curl -L https://www.npmjs.org/install.sh | sh | |
export PATH="$HOME/.node/bin:$PATH" | |
for i in cat ~/node_modules.txt;do npm install -g $i;done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment