Search code examples
react-nativereact-reduxyarnpkg

"create-react-app my-app" is not recognized


I ran "yarn add global react-native-cli", following by "yarn add react-native". By then, everything seemed correctly installed.

I then used "create-react-native-app my-app" which leads to "zsh: command not found: create-react-app".

I tried to find something relevant on other posts with the same problem, but I didn't find anything close to solve my problem.

Does anyone know why the command is not working? And what should I be doing so I can create a new React app?

Thanks !

OSX HIGH SIERRA 10.13.6

PS : here's the app that I'd like to create https://medium.com/better-programming/bitcoin-ripple-ethereum-price-checker-with-react-native-redux-e9d076037092


Solution

  • After you install react with npm install -g create-react-native-app, you need to create the app with npx, npm, or yarn.

    So the command to create a new app folder would be npx create-react-app app-name-here

    This link to the React Github explains all of the ways you can create the app: https://github.com/facebook/create-react-app