0

At the risk of looking like a complete idiot, why doesn't npx create-react-app my-app work for me? I have node and npm installed and updated, both in my path (as far as I can tell). When I type node -v and npm -v it works perfectly fine, gives me the version numbers, and I can use them just fine, but I get '"node"' is not recognized as an internal or external command, operable program or batch file. from the terminal when I try the create-react-app statement. Everything else I've found on the internet tries to say by adding it to the path it will work, but I must be missing something.

By the way, I'm using windows with GitBash. Thanks in advance.

  • Not use if it is useful info to u or not, I see many windows user face issue with username which contains space, also check ur path to project whether it contains space or not – Vengleab SO Jun 21 '21 at 15:16
  • node works perfectly fine outside of npx, wouldn't that mean the path is correct? @vengleabso – StephenBuley Jun 21 '21 at 15:21
  • No, it doesn't, node, npx, or npm which are installed in windows working fine, but some module which used by `create-react-app` does not properly check the path that contains spacing – Vengleab SO Jun 21 '21 at 15:35
  • So you are saying I need to adjust the path to be without spaces? Or just to make sure I have my spaces in the right places? Not following you here... @vengleabso – StephenBuley Jun 21 '21 at 16:29

2 Answers2

0

First step:

npm cache clean --force

Second step:

npm install -g create-react-app

Third step:

Once installation successful, try running

npx create-react-app my-app

Rukshan Jayasekara
  • 1,945
  • 1
  • 6
  • 26
0

I have same issue and I am using hyper terminal instead of hyper I used windows PowerShell and it worked for me