Skip to Content
0
Dec 03, 2021 at 12:35 PM

BuildpackCompileFailed Deploying Apps in CF

375 Views Last edit Dec 05, 2021 at 07:57 PM 5 rev

Hi Experts,

I'm receiving the next error in my db module (hdi) when I deploy my app in BTP CF.

"Error staging application "XXXX-db": BuildpackCompileFailed - App staging failed in the buildpack compile phase".

First I recevied it in srv module and I fix it with this code. Source: https://answers.sap.com/questions/13529468/error-in-deploying-cap-application.html

"engines": {
	"node": "^12.18",
	"npm": "^6.14.8"<br>} 

After that, I did changes in code to avoid new errors like:

[INTERNAL ERROR] TypeError: cds.entities is not a function (STDERR, APP/PROC/WEB)#

My application worked until a few days ago with the same code. It's a problem in sap libraries or it's problem of my cds version?

Thanks in advanced

Edit with solution: As I explained above, I fixed the below error adding "engines" parameter in my package.json.

"Error staging application "XXXX-srv": BuildpackCompileFailed - App ..."

After that, i received the same error in db module:

"Error staging application "XXXX-db": BuildpackCompileFailed - App ..."

I created a new package.json in db folder with below code (automatic created in gen/db has not engine parameter):

{
  "name": "deploy",
  "dependencies": {
    "@sap/hdi-deploy": "4.2.3"
  },
  "engines": {
    "node": "^12.20.0"
  },
  "scripts": {
    "start": "node node_modules/@sap/hdi-deploy/"
  }
}

My project is an application with two years and it's working fine in producction environment, for this reason i can't refactor old code.

Regards!