Everyone once in awhile, my install seems to get corrupted. The first thing you should always try first is to delete your node_modules folder and clean the cache:
# Once you've deleted your node_modules folder in your project.. npm cache clean npm install
But failing that, I usually uninstall Node from my system and reinstall the latest version, as well as delete the node_modules package from the project which I’m having the troubles with.
- Uninstall Node.js in your programs
- Delete c://users//username//AppData/Roaming//npm
- Delete c://users//username//AppData/Roaming//npm-cache
- Open your environment variables and delete all references to node.js / npm
Once everything is uninstalled and the machine is clean, go and and download and reinstall node. Keep in mind you’ll need to reinstall all global node packages like gulp, bower – etc.0
You can verify your versions of node.js:
# Check your node.js version node -v # Check your npm version npm -v
I’m a 28 year old web developer from Halifax, NS. When I’m not throwing out random quotes from The Office, you can probably find me hacking away on my PC or spending time with my fiance and two year old Doodle. I’ve been focusing lately on React and Java EE but I can never avoid the temptation of a new technology. Always striving to get better.