Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

2 answers

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

- npm run build

 to

- 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

with 

CI= npm run build

Suggest an answer

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

Calling any interview participants for Bitbucket Data Center

Hi everyone,  We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...

485 views 5 4
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