繁体   English   中英

运行 npm 启动和使用 npx create-react-app 创建 React 应用程序时出错

[英]Error running npm start and creating React application using npx create-react-app

我在我的系统上安装了节点和 npm 但是当我尝试使用 npx 创建 react-app 甚至运行 npm 启动节点应用程序时,我看到下面的错误。 在 C:\Users\DELL\Desktop\ReactApp\my-app 中创建一个新的 React 应用程序。

The term '/d' 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:3
+ /d <<<<  /s /c npm --version
    + CategoryInfo          : ObjectNotFound: (/d:String) [], CommandNotFoundE
   xception
    + FullyQualifiedErrorId : CommandNotFoundException



DELL@DELL-PC MINGW64 ~/Desktop/ReactApp
$ npx create-react-app my-app

Creating a new React app in C:\Users\DELL\Desktop\ReactApp\my-app.

The term '/d' 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:3
+ /d <<<<  /s /c npm --version
    + CategoryInfo          : ObjectNotFound: (/d:String) [], CommandNotFoundE
   xception
    + FullyQualifiedErrorId : CommandNotFoundException.

我面临同样的情况。 解决方案是重新启动新下载的 Visual Studio 代码,它将获得 NPM 和 Node.js 的正确路径。

暂无
暂无

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

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