cancel
Showing results for 
Search instead for 
Did you mean: 

BuildpackCompileFailed Deploying Apps in CF

jmtrujillogalan
Explorer
0 Kudos

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"} 

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!

View Entire Topic
jmtrujillogalan
Explorer

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!

gregorw
Active Contributor
0 Kudos

To give it more livetime you should try to get to Node.JS 14.

0 Kudos

had a similar issue.

changed the package.json in the approuter folder fixed it,

issue was node.js version was out of date.

in the build it mentioned these node.js versions as live

tried node:14.20.1 and it worked.

Thanks!