[英]Devops & Bitbucket Build Pipeline - not enough space on the disk
[英]Bitbucket pipeline reactjs build error
我使用 react.js 构建了 Web 应用程序,并且我想在每次提交时使用 FTP 在服务器上进行构建和部署。 为此,我配置了 bitbucket 管道,但在构建 react 应用程序时出现错误。
我通过运行“npm run build”命令测试了我的本地机器,它成功运行,没有任何错误,但在管道上,我收到以下错误:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-app@0.1.0 build: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-app@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/2018-05-16T13_18_01_726Z-debug.log
这是 bitbucket-pipeline 配置:
图像:节点:8.11.1-slim
pipelines:
default:
- step:
script:
- echo "This script runs only on staging branch"
branches:
staging:
- step:
caches:
- node
script:
- npm install
- node --version
- npm --version
- npm run build
- apt-get update
- apt-get -qq install git-ftp
- git ftp init --user $FTP_USERNAME --passwd $FTP_PASSWORD -v $FTP_HOST
我检查了 node 和 npm 版本与我在本地机器上使用的相同。
将命令npm run build
替换为CI=false npm run build
这将解决您的问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.