Skip to content

Instantly share code, notes, and snippets.

@ShMcK
Last active November 9, 2016 00:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ShMcK/20e2adb42dda57e674a77e65795debc7 to your computer and use it in GitHub Desktop.
Save ShMcK/20e2adb42dda57e674a77e65795debc7 to your computer and use it in GitHub Desktop.
Quick fix for npm dependency issues. Run "bash npm-unfuck.sh"
# 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