Missed Team ’24? Catch up on announcements here.

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

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

vincent August 19, 2019

`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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 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

vincent August 20, 2019

Thanks Jimmy for the response, I'm running `

lerna run build --stream --concurrency=10

`

Jimmy Seddon
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 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

vincent August 20, 2019

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
AUG Leaders

Atlassian Community Events