0

I recently wiped my harddrive and upgraded my MacOS to Catalina. Now running on zsh for the first time. I installed Homebrew and then node v12.14.1, which I can confirm when I run node --version. When I try to initialize a React-Native app with npx react-native init, I get the following error:

Command failed: '/usr/local/Cellar/node@12/12.14.1_1/bin/node' '/usr/local/Cellar/node@12/12.14.1_1/lib/node_modules/npm/bin/npm-cli.js' config get cache --parseable

Any advice?

jct
  • 69
  • 3
  • 11

2 Answers2

1

I was successfully able to run npx react-native init <PROJECT> by uninstalling and reinstalling Node with nvm instead of brew. Apparently installing with nvm allows for greater flexibility.

jct
  • 69
  • 3
  • 11
  • 1
    thank you it works. I uninstalled the node and npm. Then I install the nvm and using nvm I install the node. It works. :) – badarshahzad May 05 '20 at 02:13
0

Start from the top and make sure you’ve installed all the necessary components https://facebook.github.io/react-native/docs/getting-started

Serdar Mustafa
  • 835
  • 2
  • 9
  • 20