添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Create
cancel
Showing results for
Search instead for
Sign up Log in

I built web app using react.js, and I want to make build and deploy on the server using FTP on every commit. For that purpose, I configure bitbucket pipeline, but I get an error on build react app.

I tested my local machine by running "npm run build" command and it run successfully without any error, but on pipeline, I get the following error:


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

Here is bitbucket-pipeline configuration:

image: node: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


I checked by node and npm version are same as I using on my local machine.

Thanks