React: 'create-react-app' is not recognized as an internal or external command
I am trying to set up react app using create-react-app command on windows pc. But I encounter error 'create-react-app' is not recognized as an internal or external command.
with the same command, it works for me on my MacOs. Below is the error detail:
C:\Users\ugur\Desktop\deneme>npm install -g create-react-app
C:\Users\ugur\AppData\Roaming\npm\create-react-app -> C:\Users\ugur
AppData\Roaming\npm\node_modules\create-react-app\index.js
C:\Users\ugur\AppData\Roaming\npm
-- [email protected] +-- [email protected] | +-- [email protected] | +-- [email protected] | +-- [email protected] | | -- [email protected]
| +-- [email protected]
| -- [email protected] +-- [email protected] | +-- [email protected] | | +-- [email protected] | | -- [email protected]
| -- [email protected] | -- [email protected]
+-- [email protected]
`-- [email protected]
C:\Users\ugur\Desktop\deneme>create-react-app new_app
How can I resolve this issue?
You need to re-install the latest version of node and try the latest version of React.
And then
npm install -g create-react-app create-react-app my-app
I hope it useful for you!
it won't work with create-react-app because of the latest update from npx and create-react-app so u should run "npx create-react app" , i followed the docs . but its still did not work as expected , i also have an issue here...
Create-react-app is an outdated solution for creating react apps.
Just use the vite and run:
npm init vite
Then, select the react template