npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

unable to install webpack-dev-server on mac

I am trying to install webpack dev-server on my mac system.

I am able to install webpack but unable to install webpack dev-server. It gives following errors

Unhandled rejection Error: EACCES: permission denied, rename ā€˜/Users/Priyesh/.npm/_cacache/tmp/8fd7fe6eā€™


Some people are encountering problems with or after using sudo for global installs in latest npm. A likely work-around is to reset the ownerships on ~/.npm:

sudo chown -R $(whoami) ~/.npm

Or go further and remove the need to use sudo for the global install: Global installs (sudo npm i -g) fail on Mac after 6.5 upgrade. Works fine after 6.4.1 downgrade.