【问题标题】:Error running npm start and creating React application using npx create-react-app运行 npm start 并使用 npx create-react-app 创建 React 应用程序时出错
【发布时间】: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.

【问题讨论】:

    标签: node.js reactjs


    【解决方案1】:

    我遇到了同样的情况。解决方案是重新启动新下载的 Visual Studio Code,它将获得 NPM 和 Node 的正确路径。

    【讨论】:

      猜你喜欢
      • 2020-11-17
      • 1970-01-01
      • 2021-11-27
      • 1970-01-01
      • 2018-03-19
      • 1970-01-01
      • 2017-05-04
      • 2022-10-20
      • 1970-01-01
      相关资源
      最近更新 更多