Npm Debugging Guidelines (Failed npm install, bower install, or gulp build? Read this)

Recommendations

Use nvm to manage node versions

nvm installs node in your user’s home directory without needing superuser privileges. It also allows you to toggle between versions of node effortlessly. You can use nvm to install node on your server as well.

:warning::warning::warning: Do not use sudo with npm :warning::warning::warning:

You may receive an EACCES error when you try to install a package globally. This indicates that you do not have permission to write to the directories that npm uses to store global packages and commands.

The fix is documented here: https://docs.npmjs.com/getting-started/fixing-npm-permissions

https://www.youtube.com/watch?v=bxvybxYFq2o

Check the Troubleshooting Wiki

https://github.com/npm/npm/wiki/Troubleshooting

6 Likes