简体   繁体   English

NPX create-react-app 终端告诉我没有安装节点,但它是

[英]NPX create-react-app terminal tells me node is not installed but it is

At the risk of looking like a complete idiot, why doesn't npx create-react-app my-app work for me?冒着看起来像个白痴的风险,为什么npx create-react-app my-app不适合我? I have node and npm installed and updated, both in my path (as far as I can tell).我在我的路径中安装并更新了节点和 npm(据我所知)。 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.当我键入node -vnpm -v时,它工作得很好,给我版本号,我可以很好地使用它们,但我得到“节点”不被识别为内部或外部命令、可运行程序或批处理文件。 from the terminal when I try the create-react-app statement.当我尝试 create-react-app 语句时从终端。 Everything else I've found on the inte.net tries to say by adding it to the path it will work, but I must be missing something.我在 inte.net 上找到的所有其他内容都试图通过将其添加到它将起作用的路径来说明,但我一定遗漏了一些东西。

By the way, I'm using windows with GitBash.顺便说一下,我在 GitBash 中使用 windows。 Thanks in advance.提前致谢。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM