Fix: 'create-react-app' Command Not Recognized Error


Recently there was an issue we faced while training React. Generally, we give training using video series on YouTube but this time we pass on the training blogs from the C#Corner learn module. The installation process showcases we need to install node js and then run the command "create-react-app" to create a react app. But it gave us the below error.

Error: 'create-react-app' is not recognized as an internal or external command.


The command was the correct one and we generally use that. So the issue has to be something with the environment. When I checked the resolution for this in Google, it suggested using "npx" before the command. When we used that, it created the React app. So, I checked the git repository for the explanation of this.


So, the issue we faced was due to the node version installed. As per the git repository, if you have node version 5.1 or higher, you need to add "npx" before the command. if the version is lover, you can directly use the command to create the app.

I am trying to reach the author to include this as a note in the post. As comments are not allowed in the post, I am writing this blog to help someone if they face the same issue.