【问题标题】:npm ERR! reminder@0.1.0 build: `CI= react-scripts build`npm 错误!提醒@0.1.0 构建:`CI= react-scripts build`
【发布时间】:2021-04-21 21:25:11
【问题描述】:

我有一个基本的 reactjs 应用程序。
我想将它部署到 netlify。要在 netlify 上部署它,我需要先构建它。
但是当我运行npm run build 时,它会抛出以下错误。

我的 npm 版本是 6.14.8。

CI= react-scripts build

'CI' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! reminder@0.1.0 build: `CI= react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the reminder@0.1.0 build 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!     C:\Users\Amarjeet\AppData\Roaming\npm-cache\_logs\2021-01-17T11_18_13_129Z-debug.log

【问题讨论】:

  • 运行react-scripts build

标签: node.js reactjs npm build npm-build


【解决方案1】:

请去打开 package.json 请找"build": "CI= react-scripts build" 并将其更改为"build": "react-scripts build", 然后再次运行 npm run build 应该没问题的

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-09-20
    • 1970-01-01
    • 2020-09-17
    • 1970-01-01
    • 2020-01-01
    • 1970-01-01
    • 2019-02-27
    • 2022-06-29
    相关资源
    最近更新 更多