npm Community Forum (Archive)

The npm community forum has been discontinued.

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

Unable to Install react Native due to npm Issue

Problem while Installation of React Native

Unable to Install React native

Unable to install React Native

Reproduction Steps

Log file Details

0 info it worked if it ends with ok
1 verbose cli [ ‘/usr/local/Cellar/node/11.10.0/bin/node’,
1 verbose cli ‘/usr/local/bin/npm’,
1 verbose cli ‘install’,
1 verbose cli ‘-g’,
1 verbose cli ‘expo-cli’ ]
2 info using npm@6.7.0
3 info using node@v11.10.0
4 verbose npm-session 500e144d706ebc9c
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 timing npm Completed in 2519ms
8 error cb() never called!
9 error This is an error with npm itself. Please report this error at:
10 error https://npm.community

Platform Info

$ node -v
v11.10.0
$ npm -v
6.7.0
$ node -p process.platform
darwin


There are some ongoing problems with using sudo on Mac platforms. Usually, this error comes with additional logging (Unhandled rejection Error: EACCES: permission denied). Based on that, you can fix the file ownership, then try your install again:

sudo chown -R $(whoami) ~/.npm 
sudo chown -R $(whoami) /usr/local/lib 
sudo chown -R $(whoami) /usr/local/bin

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.