Last active
November 9, 2016 00:31
-
-
Save ShMcK/20e2adb42dda57e674a77e65795debc7 to your computer and use it in GitHub Desktop.
Quick fix for npm dependency issues. Run "bash npm-unfuck.sh"
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
# NPM Unfuck | |
# Brought to you by: | |
# Mackenzie Kieran & Shawn McKay | |
# remove deps | |
rm -rf node_modules | |
npm cache clean | |
# lock dependencies | |
sed -i '.bak' 's/"^/"/' package.json | |
# reinstall node_modules | |
if which yarn > /dev/null; then | |
yarn | |
else | |
npm i | |
fi | |
# say complete | |
say "done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment