0

Trying to install react-native-cli with

npm install -g react-native-cli

results in this error:

npm ERR! Darwin 16.7.0
npm ERR! argv "/Users/kamleshtilwani/.nvm/versions/node/v8.6.0/bin/node" "/Users/kamleshtilwani/.nvm/versions/node/v8.6.0/bin/npm" "install" "-g" "react-native-cli"
npm ERR! node v8.6.0
npm ERR! npm  v3.4.1
npm ERR! code MODULE_NOT_FOUND

npm ERR! Cannot find module 'internal/errors'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/kamleshtilwani/npm-debug.log

NPM install error

glennsl
  • 28,186
  • 12
  • 57
  • 75
Kamlesh Tilwani
  • 59
  • 1
  • 2
  • 16

1 Answers1

0

A quick test on my Mac suggests that updating npm will do the trick for you.

The accepted answer to this question (also on Mac) also seems to suggest that bumping npm version (to 5.4.2 in this case) will get rid of this error.

I was able to install react-native-cli on my Mac using npm 5.0.0. I downgraded to npm 3.4.1, tried to install again, and got an error similar to yours, although mine was barking about internal/fs instead of internal/errors.

Good luck!

Mike Patrick
  • 10,699
  • 1
  • 32
  • 54