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

Error in pipeline: Error: Cannot find module 'xmldom'

Edited

Our pipeline is throwing error at a certain step. But running the same command in local works. Not sure what is happening. This was working last week but it is breaking today without any changes being pushed to the pipeline configurations or any kind of code to the repo. Any help is deeply appreciated.

Command: npm run generate:package (this commands runs an internal javascript file)

Local output:

npm run generate:package

> sleep-country-occ@0.0.0 generate:package /Users/harsharma/Desktop/project
> node ./dev-scripts

2021-08-24T14:11:55.664Z info: Package updated successfully!!!

 

Pipeline output:

+ npm run generate:package
> generate:package /opt/atlassian/pipelines/agent/build
> node ./dev-scripts
internal/modules/cjs/loader.js:65$STAGE_TOSHIP_CONCURRENT_CONNECTIONS
throw err;
^
Error: Cannot find module 'xmldom'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:649:$STAGE_TOSHIP_CONCURRENT_CONNECTIONS5)
at Function.Module._load (internal/modules/cjs/loader.js:575:25)
at Module.require (internal/modules/cjs/loader.js:705:$STAGE_TOSHIP_CONCURRENT_CONNECTIONS9)
at require (internal/modules/cjs/helpers.js:$STAGE_TOSHIP_CONCURRENT_CONNECTIONS4:$STAGE_TOSHIP_CONCURRENT_CONNECTIONS6)
at Object.<anonymous> (/opt/atlassian/pipelines/agent/build/libs/oms/index.js:4:2$UAT_PAYMENT_CONCURRENT_CONNECTIONS)
at Module._compile (internal/modules/cjs/loader.js:799:$UAT_PAYMENT_CONCURRENT_CONNECTIONS0)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:8$STAGE_TOSHIP_CONCURRENT_CONNECTIONS0:$STAGE_TOSHIP_CONCURRENT_CONNECTIONS0)
at Module.load (internal/modules/cjs/loader.js:666:$UAT_PAYMENT_CONCURRENT_CONNECTIONS2)
at tryModuleLoad (internal/modules/cjs/loader.js:606:$STAGE_TOSHIP_CONCURRENT_CONNECTIONS2)
at Function.Module._load (internal/modules/cjs/loader.js:598:$UAT_PAYMENT_CONCURRENT_CONNECTIONS)
at Module.require (internal/modules/cjs/loader.js:705:$STAGE_TOSHIP_CONCURRENT_CONNECTIONS9)
at require (internal/modules/cjs/helpers.js:$STAGE_TOSHIP_CONCURRENT_CONNECTIONS4:$STAGE_TOSHIP_CONCURRENT_CONNECTIONS6)
at Object.<anonymous> (/opt/atlassian/pipelines/agent/build/api/controllers/OrderController.js:$STAGE_TOSHIP_CONCURRENT_CONNECTIONS2:$STAGE_TOSHIP_CONCURRENT_CONNECTIONS6)
at Module._compile (internal/modules/cjs/loader.js:799:$UAT_PAYMENT_CONCURRENT_CONNECTIONS0)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:8$STAGE_TOSHIP_CONCURRENT_CONNECTIONS0:$STAGE_TOSHIP_CONCURRENT_CONNECTIONS0)
at Module.load (internal/modules/cjs/loader.js:666:$UAT_PAYMENT_CONCURRENT_CONNECTIONS2)
npm ERR! code ELIFECYCLE
npm ERR! errno $STAGE_TOSHIP_CONCURRENT_CONNECTIONS
npm ERR! sleep-country-occ@0.0.0 generate:package: `node ./dev-scripts`
npm ERR! Exit status $STAGE_TOSHIP_CONCURRENT_CONNECTIONS
npm ERR!
npm ERR! Failed at the sleep-country-occ@0.0.0 generate:package 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/202$STAGE_TOSHIP_CONCURRENT_CONNECTIONS-08-24T$STAGE_TOSHIP_CONCURRENT_CONNECTIONS4_$STAGE_TOSHIP_CONCURRENT_CONNECTIONS$UAT_PAYMENT_CONCURRENT_CONNECTIONS_28_$STAGE_TOSHIP_CONCURRENT_CONNECTIONS58Z-debug.log

 

1 answer

1 accepted

0 votes
Answer accepted

Found the fix - it was missing dependencies.

Suggest an answer

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

⭐ Calling all Bitbucket and DevOps experts: Special showcase opportunity ⭐

Hi, Bitbucket community! Are you a DevOps practitioner (or know one in your network)? Do you have DevOps tips, tricks, or learnings you'd like to share with the community? If so, we'd love to hea...

1,521 views 4 8
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