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
Found the fix - it was missing dependencies.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.