繁体   English   中英

在npm上启动启动应用程序时出错

[英]Getting error on npm start create-react-app

我目前正在学习React。 我已经做好了:

  • npm i -g create-react-app (成功)
  • create-react-app react-app (成功)
  • cd react-app
  • npm start (上面的错误)

输出:

  • 此时,npm start \\ Git \\ cmd是意外的。

  • npm ERR! 代码ELIFECYCLE

因此,我尝试通过在线搜索进行尝试:

  • npm cache clean --force
  • 删除node_modules
  • 删除package-lock.json
  • npm run clear
  • npm安装

没有解决。 我读过我不应该在全球范围内安装,但是现在已经安装了(?),可以回滚吗? 我无法再次运行npm ig create-react-app。 谢谢

编辑:添加了截图https://i.ibb.co/mNKLskX/Capturar.png

使用npm试试init

npm init react-app my-app

或者,尝试npx

npx create-react-app my-app

cd my-app

npm start

您是否尝试按照“ create-react-app”中的步骤进行操作?

`要创建新应用,您可以选择以下方法之一:

像素

 npx create-react-app my-app

(npx随npm 5.2及更高版本一起提供,请参阅旧版npm的说明)

npm

npm init react-app my-app

npm init可在npm 6+中使用

yarn create react-app my-app

在纱线0.25+中可以使用yarn create

要了解更多信息,请访问: https : //github.com/facebook/create-react-app

暂无
暂无

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

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