npm 错误!提醒@0.1.0 构建:`CI= react-scripts 构建`

问题描述

我有一个基本的 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

解决方法

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

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...