NPM self reporting error while using create-react-app

(Roger Svendsen) #1

Unhandled rejection Error: EACCES: permission denied, open ‘/xxxx/xxxx/.npm/_cacache/index-v5/56/ea/1025ec198e598daf3288ac6f4194a08e119f584c8d58782e64b45ed71f09’

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!

npm ERR! A complete log of this run can be found in:
npm ERR! /xxxx/xxxx/.npm/_logs/2019-05-04T21_22_33_632Z-debug.log

Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts has failed.

(John Gee) #2

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:

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.

(Roger Svendsen) #3

Thank you @shadowspawn

1 Like
(system) closed #4

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