- Run
npm ls -g --depth=0 | grep -e '->' > npm-links.txt
, the-e
ensures that the-
isn't treated as a flag. - Edit
npm-links.txt
to only the package paths. - Run
cat npm-links.txt | xargs -I '{}' -t sh -c 'cd {}; npm unlink'
Created
April 7, 2018 15:56
-
-
Save ferdaber/359dd9ac5a609b7e0881b901028b18f4 to your computer and use it in GitHub Desktop.
How to unlink npm files at the global level
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment