It's best to try any of this steps running as admin.
If you get an EACCES error during install, you should fix your permissions.
If npm install
fails for whatever reason (bad wi-fi etc.) make sure to delete node_modules
and run npm cache clean
before trying again (this is a bug with npm dependency resolution).
rm -rf node_modules && npm cache clean && npm install