jct
jct

Reputation: 69

issues running `npx react-native init <NAME>

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?

Upvotes: 0

Views: 1526

Answers (2)

jct
jct

Reputation: 69

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.

Upvotes: 1

Serdar Mustafa
Serdar Mustafa

Reputation: 935

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

Upvotes: 0

Related Questions