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! email@example.com build: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR! Failed at the firstname.lastname@example.org 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:
- echo "This script runs only on staging branch"
- 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.
Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events