cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CAP - Node.js - cf push crashes

Bruno-Franzini
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi all,

I'm executing CF Push command in terminal to push app into BTP CF repository, but I'm getting this error when cf push command is executed.

Both risk-management-srv and risk-management-db-deployer are to be pushed at once.

I've run cf logs risk-management --recent and the error message says: 'Unable to require require package/file.json "passport". However, I'd already installed passport module by npm i passport. furthermore, the package-lock.json had been deleted and re-run npm install.

Could anyone provide me any assistance, please?

Best regards

Bruno Franzini

View Entire Topic
Bruno-Franzini
Product and Topic Expert
Product and Topic Expert

Just found out the resolution...

I've just run the following commands in the sequence:

  1. npm install
  2. cds build/all --clean

Problem is solved.

Thank you

martinstenzig
Contributor
0 Kudos

you probably want to add the complete xsuaa package to be prepared for the future. That Includes passport. The easiest way to do that is: cds add xsuaa

Girish_Kumar_Gu
Participant
0 Kudos

Hi bfranzini01

I've tried all suggestions given in the blog or SAP Note. Nothing is working for me and I am getting same "Unable to require required package/file "passport" error.

Any idea, what else can be tried?

Thanks

former_member124169
Discoverer
0 Kudos

Awesome ! this worked for me - thank you for posting the solution