node.js - npm 错误!react-amplify-project-three@0.1.0 build: `react-scripts --max_old_space_size=2048 build`
问题描述
错误:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-amplify-project-three@0.1.0 build: `react-scripts --max_old_space_size=2048 build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-amplify-project-three@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! /root/.npm/_logs/2019-08-30T05_23_44_594Z-debug.log
在 Bitbucket Pipeline 中运行此步骤:
- step:
name: Dev Docker Build
deployment: dev-docker-build
trigger: manual
size: 2x
script:
- npm install
- npm run build
使用的配置:
"scripts": {
"start": "react-scripts start",
"build": "react-scripts --max_old_space_size=2048 build",
"test": "react-scripts test",
"eject": "react-scripts eject"
解决方案是什么?
解决方案
我对此有答案。在你的 npm 命令中添加这一行“CI=false”
- npm install
- CI=false npm run build
推荐阅读
- elasticsearch - Filebeat 收获旋转文件
- ios - Swift - 从 GraphRequest 中获取 Facebook 的用户电子邮件
- unit-testing - 仅在单元测试时在方法中插入一行代码
- c++ - 访问映射中向量的最后一个元素 (C++)
- javascript - 如何使用 Puppeteer 截取表格?
- javascript - jQuery Tablesorter 不适用于日期
- javascript - 获取传单中所有标记的坐标列表
- python - 为什么在将 numpy 向量除以 numpy 范数时不能使用就地除法运算符
- mongodb - MongoDB Aggregation:双重查找,并将查找响应合并到各个对象
- python - 具有异常检测的 CloudWatch 警报的 AWS-CDK 示例