【问题标题】:An error occurred while following creat-react-app跟随 create-react-app 时出错
【发布时间】:2018-09-02 18:49:21
【问题描述】:

我想快速解决这些错误并学习。但是搜索仍在继续,即使其他人尝试这样做,症状也会继续出现。

> hello-react@0.1.0 start /Users/kimseungwon/hello-react
> react-scripts start

> npm ERR! file sh
> npm ERR! path sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn sh
npm ERR! hello-react@0.1.0 start: `react-scripts start`
npm ERR! spawn sh ENOENT
npm ERR! 
npm ERR! Failed at the hello-react@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/kimseungwon/.npm/_logs/2018-09-02T08_28_05_806Z-debug.log

节点版本:8.11.4
npm 版本:5.6.0

为什么会这样?

【问题讨论】:

  • 您好!尝试以管理员权限运行并发布 debug.log

标签: javascript node.js reactjs npm


【解决方案1】:

您不需要使用 react-scripts 命令运行项目,只需使用如下所示的 npm 命令即可,如您在 package.json 脚本对象中所见:

npm run start

【讨论】:

    猜你喜欢
    • 2020-11-13
    • 2018-12-04
    • 1970-01-01
    • 2017-10-27
    • 2018-08-23
    • 2020-04-19
    • 2020-09-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多