Open juliepwchen opened 6 years ago
I had a similar error, and it seems that the internet thinks that errors of this kind are best resolved by removing & reinstalling node. It worked for me. See the top answer here: https://stackoverflow.com/questions/33870520/npm-install-cannot-find-module-semver
I typed the command to install react-native-cli using "> npm install -g react-native-cli", and got the following error messages. Advise?
module.js:538 throw err; ^
Error: Cannot find module '../lib/utils/unsupported.js' at Function.Module._resolveFilename (module.js:536:15) at Function.Module._load (module.js:466:25) at Module.require (module.js:579:17) at require (internal/module.js:11:18) at /usr/local/lib/node_modules/npm/bin/npm-cli.js:19:21 at Object. (/usr/local/lib/node_modules/npm/bin/npm-cli.js:92:3)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
Julies-Mac-mini:~ juliechen$ pwd
/Users/juliechen
Julies-Mac-mini:~ juliechen$ sudo npm install -g react-native-cli
Password:
module.js:538
throw err;
^
Error: Cannot find module '../lib/utils/unsupported.js' at Function.Module._resolveFilename (module.js:536:15) at Function.Module._load (module.js:466:25) at Module.require (module.js:579:17) at require (internal/module.js:11:18) at /usr/local/lib/node_modules/npm/bin/npm-cli.js:19:21 at Object. (/usr/local/lib/node_modules/npm/bin/npm-cli.js:92:3)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)