Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bitbucket pipeline build error

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! 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

- step:
- echo "This script runs only on staging branch"
- step:
- node
- 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.


2 answers

I had the same issue, solution for me:
change the  command

- npm run build


- CI=false npm run build

Thanks! worked for me too

I has the same issue!!!

Same issue to me. Any solutions ?

Got the same issue as well

Guys i am having the same problem, did someone solve this? I am using image the image from node 11.9.0. deploying a create react app

Like Qamar Azam likes this

Are you using create react app 2? From memory CRA1 doesn’t work well for CI builds.

@Matt Goodson @Andres Sebastian Caceres Valdiviezo 

I solved the issue by replacing

npm run build


CI= npm run build

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

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...

3,734 views 10 16
Read article

Community Events

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

Events near you