Why Node not found when running react-scripts?

Viewed 67

Created a default create-react-app project. And tried to run it yarn start. Tried to run it in cmd, powershell.
And getting an error:
my-app/node_modules/.bin/react-scripts: node: not found

This is the problematic line in the script:
node "$basedir/../react-scripts/bin/react-scripts.js" "$@" <-- node not found

I checked my PATH vars and set a high priority for C:\Program Files\nodejs Reinstalled node.js and installed a different version 12.14

UPDATE: If I run it in bash it works properly. But still, though need to solve it on other terminals

1 Answers

The problem was I had installed WSL and somehow it was running in that environment and there wasn't Node installed there. So I removed WSL and now it runs okay.

Related