cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Deployment of MTAR fails when build-parameters: ignore: ["node_modules/"] is set

gregorw
SAP Mentor
SAP Mentor
2,784

Hello SAP BAS Team,

today I faced another issue that is realated to the package-lock.json (for which I've posted: How to avoid changes in package-lock.json when using local and BAS development in parallel?). As I try to keep the MTAR resulting from the build as small as possible I've added:

    build-parameters:
      ignore: ["node_modules/"]

to the mta.yaml configuration of my CAP Node.JS project for the srv and db module. But when I now build this in BAS the deploy fails as the CF build environment seems to have no access to http://nginx-redirector.repo-cache.svc.cluster.local. That causes the db deploy module to fail as the dependency:

"@sap/hdi-deploy": "^4"

was not installed during the build. I would suggest that either the issue : How to avoid changes in package-lock.json when using local and BAS development in parallel? get's solved or the CF Build process also get's access o http://nginx-redirector.repo-cache.svc.cluster.local.

Best Regards
Gregor

Accepted Solutions (1)

Accepted Solutions (1)

SebastianEsch
Active Participant
0 Kudos

Hi Chamdeep,

check out the answer from Thomas Jung here https://answers.sap.com/questions/13544661/how-to-avoid-changes-in-package-lockjson-when-usin.html

Then the package-lock.json should contain URLs that can be resolved by the CF runtime.

When you exclude the node_modules folder in your MTAR, your dependencies are installed during deployment instead of included in the archive.

Cheers,

Sebastian

Answers (0)