【问题标题】:how do I create a new project with create-react-app如何使用 create-react-app 创建一个新项目
【发布时间】:2019-08-21 16:45:37
【问题描述】:

我新开始使用 mac os。在使用 create-react-app 创建一个新项目时,我遇到了一个错误:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! recipe@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the recipe@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/macbook/.npm/_logs/2019-08-21T16_25_25_607Z-debug.log

【问题讨论】:

  • 你运行了什么命令导致了这个错误?
  • 日志有提示吗?
  • 可能缺少包。运行npm install首先安装所有依赖项,然后运行你运行的命令
  • 你能粘贴你运行的命令吗?
  • 我认为他是通过查看日志运行npm start

标签: javascript reactjs webpack create-react-app


【解决方案1】:

你需要运行:

npm install

在你可以运行之前:

npm start

【讨论】:

    猜你喜欢
    • 2020-06-14
    • 2020-09-16
    • 1970-01-01
    • 2020-10-10
    • 2020-11-26
    • 2022-08-22
    • 2018-07-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多