【发布时间】:2020-01-21 15:29:45
【问题描述】:
我在我的系统上安装了 node 和 npm,但是当我尝试使用 npx 创建 react-app 甚至为 node 应用程序运行 npm start 时,我看到下面的错误。 在 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.
【问题讨论】: