Vishal
Vishal

Reputation: 59

Getting error while installing npm

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)

Upvotes: 1

Views: 800

Answers (1)

MinimalMaximizer
MinimalMaximizer

Reputation: 392

Try installing yarn.

brew install yarn

yarn global add npm

npm --version

Hope that works.

Upvotes: 2

Related Questions