为什么在 运行 个反应脚本时找不到节点?

Why Node not found when running react-scripts?

创建了一个默认的 create-react-app 项目。并试图运行它yarn start。试图在 cmdpowershell.
中 运行 并出现错误:
my-app/node_modules/.bin/react-scripts:节点:未找到

这是脚本中有问题的行:
node "$basedir/../react-scripts/bin/react-scripts.js" "$@" <-- node not found

我检查了我的 PATH 变量并为 C:\Program Files\nodejs 设置了高优先级 重新安装 node.js 并安装了不同的版本 12.14

更新: 如果我 运行 它在 bash 它工作正常。不过还是需要在其他终端解决

问题是我已经安装了 WSL,不知何故它在那个环境中 运行 而且那里没有安装 Node。所以我删除了 WSL,现在它运行正常了。