I am trying to set up react app using create-react-app command on windows pc. I already used it on my mac computer, and it works well. But I encounter a problem. Here my ste
First Check your Node version. if your node version is 8 or greater then 8 then
use
'npx create-react-app my-app'
In the above version we need to change only one word that is npx
You don't need to do another things. I hope this will help you
npx install create-react-app nameOfYourFolder
instead of npm
install create-react-app nameOfYourFolder
(npx comes with npm 5.2+
and higher)cd nameOfYourFolder
npm start
You can find more in React documentation here
I solved problem by following below steps
1) open Node.js command prompt
2) Then type "npm install create-react-app -g" (g for global access) command to install create-react-app
3) Then type "npm install create-react-native-app -g" (g for global access) command to install create-react-native-app
Follow step #2 for use create-react-app
Follow step #3 only if you want to use create-react-native-app otherwise its optional.
Another one that might work is to use Powershell and type:
npx create-react-app new_app --use-npm