npm Community Forum (Archive)

The npm community forum has been discontinued.

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

Manually Installing Peer Dependencies

I have been trying to manually install peer dependencies, however terminal keeps telling me that there is an issue with npm itself. I’ve attached a screenshot below. Any help would be great!![


Welcome @anayapatel. There is an open issue with installing global packages using sudo leaving behind files with the wrong ownership.

The short version is run this to fix the ownership, then try your install again (assuming bash shell):


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

The long version and canonical bug is: Global installs (sudo npm i -g) fail on Mac after 6.5 upgrade. Works fine after 6.4.1 downgrade.


Also clearing the cache and not using sudo at all should help too.