简体   繁体   English

Vs 代码中的 npx-create-react-app my-app 命令错误

[英]npx-create-react-app my-app command ERROR in Vs Code

npx : The term 'npx' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, 
verify that the path is correct and try again.
At line:1 char:1
+ npx create-react-app my-app
+ ~~~
    + CategoryInfo          : ObjectNotFound: (npx:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

You should install npx globally, try this:您应该全局安装 npx,试试这个:

npm i -g npx

On mac/linux use sudo:在 mac/linux 上使用 sudo:

sudo npm i -g npx

have you install the Node.Js?你安装了 Node.Js 吗?

https://nodejs.org/en/download/ https://nodejs.org/en/download/

if so, it's probably a "PATH environment variable" issue如果是这样,可能是“PATH 环境变量”问题

Fixing npm path in Windows 8 and 10 在 Windows 8 和 10 中修复 npm 路径

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

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