Showing results for 
Search instead for 
Did you mean: 
SAP Community Log-in Update
In a few months, SAP Community will switch to SAP Universal ID as the only option to login. Don’t wait, create your SAP Universal ID now! If you have multiple accounts, use the Consolidation Tool to merge your content. Get started with SAP Universal ID now!

Developing with SAP Extension Suite - CI/CD Pipeline build failure



I followed the steps in the tutorial to do an automated build via CI/CD service. I tried to run the job via CI/CD cockpit to test, but it fails. 



[2022-11-24T11:42:28.515Z] error mtaBuild - npm ERR! Cannot read property '@sap-cloud-sdk/http-client' of undefined
[2022-11-24T11:42:28.551Z] info  mtaBuild - 
[2022-11-24T11:42:28.586Z] error mtaBuild - npm ERR! A complete log of this run can be found in:
[2022-11-24T11:42:28.622Z] error mtaBuild - npm ERR!     /home/mta/.npm/_logs/2022-11-24T11_42_24_763Z-debug.log
[2022-11-24T11:42:28.659Z] error mtaBuild - [2022-11-24 11:42:24] ERROR could not build the "risk-management-srv" module: could not execute the "npm clean-install --production" command: exit status 1
[2022-11-24T11:42:28.695Z] info  mtaBuild - make: *** [Makefile_20221124114138.mta:37: risk-management-srv] Error 1
[2022-11-24T11:42:28.731Z] info  mtaBuild - Error: could not build the MTA project: could not execute the "make -f Makefile_20221124114138.mta p=CF mtar=risk-management.mtar strict=true mode= t=\"/home/jenkins/agent/workspace/riskmanagement-job\"" command: exit status 2
[2022-11-24T11:42:28.767Z] info  mtaBuild - fatal error: errorDetails{"category":"build","correlationId":"n/a","error":"running command 'mbt' failed: cmd.Run() failed: exit status 1","library":"SAP/jenkins-library","message":"failed to execute mta build","result":"failure","stepName":"mtaBuild","time":"2022-11-24T11:42:24.780906692Z"}
[2022-11-24T11:42:28.802Z] fatal mtaBuild - failed to execute mta build - running command 'mbt' failed: cmd.Run() failed: exit status 1
[2022-11-24T11:42:28.838Z] info  mtaBuild - persisting reports to GCS is disabled, because gcsBucketId is empty
[2022-11-24T11:42:28.874Z] info  mtaBuild - Step telemetry data:{"StepStartTime":"2022-11-24 11:41:38.752086498 +0000 UTC","PipelineURLHash":"50f013532a9770a2c2cfdc38b7581dd01df69b70","BuildURLHash":"50f013532a9770a2c2cfdc38b7581dd01df69b70","StageName":"Build","StepName":"mtaBuild","ErrorCode":"1","StepDuration":"46029","ErrorCategory":"build","CorrelationID":"n/a","PiperCommitHash":"e2db94dc5e9debcc618bdf706f83941e4ced0f5e","ErrorDetail":{"category":"build","correlationId":"n/a","error":"running command 'mbt' failed: cmd.Run() failed: exit status 1","library":"SAP/jenkins-library","message":"failed to execute mta build","result":"failure","stepName":"mtaBuild","time":"2022-11-24T11:42:24.780906692Z"}}
[2022-11-24T11:42:42.664Z] ----------------------------------------------------------
[2022-11-24T11:42:42.753Z] --- An error occurred in the library step: dockerExecuteOnKubernetes
[2022-11-24T11:42:43.252Z] ----------------------------------------------------------
[2022-11-24T11:42:43.321Z] The following parameters were available to the step:
[2022-11-24T11:42:43.355Z] ***
[2022-11-24T11:42:43.402Z] *** to show step parameters, set verbose:true in general pipeline configuration
[2022-11-24T11:42:43.437Z] *** WARNING: this may reveal sensitive information. ***
[2022-11-24T11:42:43.471Z] ***
[2022-11-24T11:42:43.540Z] The error was:
[2022-11-24T11:42:43.575Z] ***
[2022-11-24T11:42:43.611Z] hudson.AbortException: [mtaBuild] Step execution failed (category: build). Error: running command 'mbt' failed: cmd.Run() failed: exit status 1
[2022-11-24T11:42:43.647Z] ***
[2022-11-24T11:42:43.719Z] Further information:
[2022-11-24T11:42:43.754Z] * Documentation of library step dockerExecuteOnKubernetes:
[2022-11-24T11:42:43.790Z] * Source code of library step dockerExecuteOnKubernetes:
[2022-11-24T11:42:43.826Z] * Library documentation:
[2022-11-24T11:42:43.861Z] * Library repository:
[2022-11-24T11:42:43.931Z] ----------------------------------------------------------

The build works  fine when doing it manually on the BAS 

Can someone help here ?


Hi, is the first log the entire one? Seems like it's just a small part of it. Could you please share the entire one? And if possible, also a git-repo for your code. Thanks.
Stellar 3

Dear Nitin,

As the error says, 

Cannot read property '@sap-cloud-sdk/http-client' of undefined

I have added the below list of commands in the mta.yaml to make the build success.

 - npm install
 - npx -p @SAP/cds-dk cds build --production
 - npm install @SAP-cloud-sdk/http-client
 - npm update --package-lock-only
 - npm clean-install --production

Sabari Nathan

Accepted Solutions (1)

Accepted Solutions (1)


Many thanks, this works. 


Hi @NitinMahajan,

Thank you for sharing this with us. We are glad to hear that this is solve. 
I would like to ask you to use function “Answer” button to complete this question.
Please always feel free to post question related to our SAP BTP learning journeys in our  SAP BTP Learning.
We are here to support you.

Kind regards,



Answers (2)

Answers (2)


This issues is resolved. Many thanks !


Thanks for your help @Sabarinathan1!


You could also install them directly, so that they are part of your package.json. In your case, they are then only part of the build. But in this case, this is also fine.