Create
cancel
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

`Build and Test` NOT pickup the npm ERR during npm run buil and render as passed on CI Edited

`Build and Test` NOT pickup the npm ERR during npm run buil and render as passed on CI

it shows as Finished task 'Run Build' with result: Success, but when look inside the log we found npm error in one of the task of the npm run build (lerna)

npm ERR! code ELIFECYCLE
error	16-Aug-2019 08:31:34	npm ERR! errno 1
error	16-Aug-2019 08:31:34	npm ERR! @lint-ui/ui@20.0.0 build:packages: `lerna run build --stream --concurrency 10`
error	16-Aug-2019 08:31:34	npm ERR! Exit status 1
error	16-Aug-2019 08:31:34	npm ERR! 
error	16-Aug-2019 08:31:34	npm ERR! Failed at the @lint-ui/ui@20.0.0 build:packages script.
error	16-Aug-2019 08:31:34	npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
error	16-Aug-2019 08:31:34	
error	16-Aug-2019 08:31:34	npm ERR! A complete log of this run can be found in:
error	16-Aug-2019 08:31:34	npm ERR!     /root/.npm/_logs/2019-08-16T15_31_34_121Z-debug.log
error	16-Aug-2019 08:31:34	ERROR: "build:packages" exited with 1.
error	16-Aug-2019 08:31:34	npm ERR! code ELIFECYCLE
error	16-Aug-2019 08:31:34	npm ERR! errno 1
error	16-Aug-2019 08:31:34	npm ERR! @lint-ui/ui@20.0.0 build: `run-s clean bootstrap build:**`
error	16-Aug-2019 08:31:34	npm ERR! Exit status 1
error	16-Aug-2019 08:31:34	npm ERR! 
error	16-Aug-2019 08:31:34	npm ERR! Failed at the @lint-ui/ui@20.0.0 build script.
error	16-Aug-2019 08:31:34	npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
error	16-Aug-2019 08:31:34	
error	16-Aug-2019 08:31:34	npm ERR! A complete log of this run can be found in:
error	16-Aug-2019 08:31:34	npm ERR!     /root/.npm/_logs/2019-08-16T15_31_34_142Z-debug.log
simple	16-Aug-2019 08:31:35	Finished task 'Run Build' with result: Success

 

1 answer

0 votes
Jimmy Seddon Community Leader Aug 20, 2019

Hi @vincent ,

Welcome to the Community!

What type of task are you using to run the npm build?  I have seen cases where using a script task will report a success if you don't catch and throw the npm error as the "script" exited cleanly and that is what was reported as the success.

I hope that helps!

-Jimmy

Thanks Jimmy for the response, I'm running `

lerna run build --stream --concurrency=10

`

Jimmy Seddon Community Leader Aug 20, 2019

That looks like you are running an inline script task?

If so you might want to add some error handling to catch the npm error and throw an exception and break execution, which should send a failure signal to the bamboo agent running that job.

I hope that helps!

-Jimmy

ok thx, will give it a try, my understanding of how Bamboo CI agent catch up error is by only looking at the exit status >0, is that right? 

Suggest an answer

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

Bamboo 7.1 is here and is packed with value!

I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...

673 views 1 6
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