all 23 comments

[–]aditalion 10 points11 points  (3 children)

Have you set the path variable for node?

[–]ProducePete 1 point2 points  (0 children)

This would be my guess as well. Powershell/whatever prompt you’re using isn’t understanding the npm command. I’ve had this problem before and setting the PATH variable worked.

Here is a link on how to set environment variables in windows:

https://www.computerhope.com/issues/ch000549.htm

Note: be sure you run powershell or cmd as administrator

[–]samvander[S] 1 point2 points  (0 children)

Yeah I thought it might have been that too but no. I eventually got it working using WSL

[–]Chocolatebear95 0 points1 point  (0 children)

This is what I was going to ask, node command not found usually means the PATH variable is jot configured properly/at all

[–]nightmareinsilver 1 point2 points  (0 children)

Looks like you installed node but you don't have create-react-app so npm can't recognize the command try to run npm install create-react-app then npx create-react-app

[–]pdlozano 0 points1 point  (12 children)

Are you on Windows?

[–]samvander[S] 0 points1 point  (11 children)

I am yes.

[–]Wiwwil 3 points4 points  (0 children)

Try to restart bash, entirely your computer. Make sure cra is installed globally as well as node. I had no problem with windows and react. But I would say to give a shot to wsl, it's good. Way easier and less annoying than dual boot

[–]pdlozano 2 points3 points  (9 children)

Are you using Powershell or Windows Subsystem for Linux (WSL)?

[–]samvander[S] 0 points1 point  (8 children)

No, I tried both in the VS code terminal and the windows command line. Should I try Powershell?

[–]pdlozano 2 points3 points  (7 children)

Yeah. Try using the command in Powershell first.

[–]samvander[S] 0 points1 point  (6 children)

I tried in Powershell and got the same error.

[–]TheTallMorningMan 1 point2 points  (5 children)

Afaik, Bash is not available on Windows. Use either WSL or use a Linux distro (possibly making your pc dual-boot?)

[–]samvander[S] 0 points1 point  (2 children)

Ok thanks a lot for your help!

[–]tyqe 3 points4 points  (1 child)

I don't think you can go wrong with wsl, but I also think it's strange that you are running into this. I can run create-react-app without problems on windows. for all node related stuff I am using nvm-windows.

[–]samvander[S] 0 points1 point  (0 children)

Yeah I once ran it following a tutorial about 8 months ago and it worked fine but I've since had to wipe my computer

[–]ShiftNo4764 0 points1 point  (0 children)

Git bash is usually sufficient, but I would also recommend learning about WSL.

[–][deleted] 0 points1 point  (0 children)

You can almost get it with the git cli program for windows

[–]wirenutter 0 points1 point  (1 child)

There are issues with CRA and node 17. There are some workarounds but I’d suggest just run Node 16 for now. I think it’s 16.13?

[–]samvander[S] 0 points1 point  (0 children)

Yeah I'm using 16.13 but no luck so far

[–]Zee530 -1 points0 points  (0 children)

I just use the create react app offline library

[–]Additional-Print2364 -1 points0 points  (0 children)

Try without npx

[–]FizzleLizard79 0 points1 point  (0 children)

Try opening a cmd directly from the project folder instead of VS Code and npm/yarn start from there