1

I have installed node through brew install node, Node has been installed but after running:

npm install -g create-react-native-app

npm is showing the following error:

module.js:487

   throw err;
   ^

Error: Cannot find module '../lib/utils/unsupported.js'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at /usr/local/lib/node_modules/npm/bin/npm-cli.js:19:21
    at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm-cli.js:92:3)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
2
  • 1
    What command did you run to get it to show that error? Commented Jul 5, 2017 at 16:37
  • I run 'npm install -g create-react-native-app' and got this error. Commented Jul 6, 2017 at 5:14

1 Answer 1

2

Try installing yarn.

brew install yarn

yarn global add npm

npm --version

Hope that works.

Sign up to request clarification or add additional context in comments.

1 Comment

Alternatively, uninstalling node/npm then reinstalling it seems to also work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.