首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >npm错误!reminder@0.1.0 build:`CI= react-scripts build`

npm错误!reminder@0.1.0 build:`CI= react-scripts build`
EN

Stack Overflow用户
提问于 2021-01-17 19:22:22
回答 2查看 1.4K关注 0票数 0

我有一个基本的reactjs应用。

我想把它部署到netlify上。要在netlify上部署它,我需要首先构建它。

但是当我运行npm run build时,它抛出了以下错误。

我的npm版本是6.14.8。

代码语言:javascript
复制
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
EN

回答 2

Stack Overflow用户

发布于 2021-01-29 21:14:54

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

票数 3
EN

Stack Overflow用户

发布于 2022-02-20 10:39:46

转到package.json文件并在脚本对象中进行更改,从“CI= react-scripts build”更改为"react-scripts build“,然后运行命令npm run build it will works。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65759981

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档