Home > Blockchain >  Why does create react app return an error?
Why does create react app return an error?

Time:10-12

I'm trying to create a React app, I just installed Node.js but the command npx create-react-app . doesn't work for some reason. Here is a screen shot from cmd: variables variables pic

CodePudding user response:

Your COMSPEC variable is messed up.

  • Press Win R
  • Enter sysdm.cpl and click OK
  • Go to "advanced" tab
  • Click button "environment variables"
  • If there is a ComSpec or COMSPEC entry in the top list: Delete it
  • If there is a ComSpec or COMSPEC entry in the bottom list and it's not ending with cmd.exe: Change it to C:\Windows\system32\cmd.exe.
  • Click OK
  • Restart your computer

CodePudding user response:

You should add your app name you forgot that:

 npx create-react-app exercise

exercise: your app name

  • Related