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.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.