cancel
Showing results for 
Search instead for 
Did you mean: 

Staging error while deploying Angular Application on Cloud Foundry with nodejs buildpack.

0 Kudos

Hi,

I want to deploy my Angular Application with on-premise(ABAP System) as backend to SAP Cloud Foundry.

My manifest.yml file looks like this.

applications:
- name: app-angular
  memory: 512M
  disk_quota: 1024M
  instances: 1
  buildpack: nodejs_buildpack
  services:
    - destination_service
    - uaa_service
    - connectivity_service

I am using cf CLI to deploy the app.

When I execute 'cf push' command, I am facing this error:

-----> Building dependenciesInstalling node modules (package.json)

Error staging application: App staging failed in the buildpack compile phaseFAILED

Can you please help me resolve this error. If its related to node version, please let me know how to determine the correct one.

Accepted Solutions (1)

Accepted Solutions (1)

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi shruthiumashankar,

Please change you manifest.yml file to use buildpack 'staticfile_buildpack' instead of nodejs.

The nodejs buildpack is used for pure node applications whereas angular is precompiled and depends only on a server to provide the files to the end user. Static File implements an Nginx server that will serve the static html files to the browser.

If you are interested on working with an MTA type project, you could use nodejs module with the SAP AppRouter application (which runs on NodeJS). In its configuration file xs-app.json you would add a route to the static folder inside that module where you have the Angular precompiled files.

Best regards,
Ivan

Thanks a lot ivan.mirisola . I used staticfile_buildpack and it worked !!

Answers (0)