-
-
Save 10thfloor/eacbde319d89221bdd9e8c3012a9675a 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
TODO:
[ ] Check if .babelrc and package.json have matching babel plugins/presets. If not install or add missing ones.
[ ] Package.json linter?