on ‎2021 Aug 04 11:31 AM
Hi ,
Issue is while deploying CAP application.
While deploying "Deploy MTA Archive" , it error outs saying " Some instances have crashed "
I checked the logs of service in DEV space.
To resolve this , I have executed "npm init" to regenerate package.json and "npm install socket.io --save"
But even after this I am facing the same.
Does anyone have faced this issue earlier and any solution on this.
Thanks,
Thulja
Request clarification before answering.
I'm following the same tutorial and have the same issue. The tutorial doesn't cover the cf deploy steps to Cloud Foundry, which is when the error occurs. I spent a couple of days but was able to fix the problem after comparing to a default CAP project template. The problem is with this step:
As CDS build seems to have a bug in the generation of srv artifacts using "." as target. I noticed the following debug lines and files were missing with the current working directory target:
[cds] - node-cf: adding node engines version to package.json
[cds] - done > wrote output to:
gen/srv/.cfignore
gen/srv/manifest.yml
gen/srv/package.json
To fix this, I ran the following command from the terminal:
cds build --for node-cf --dest gen --opts model=[data,srv,app]
Next, copy .cfignore, manifest.yml, and package.json into the root of srv from the gen/srv path to which they are written.
Finally, create a new subfolder srv/srv and copy the _i18n and csn.json files into it. Final project structure looks something like this:

I was able to deploy successfully from there. Tagging thomas.jung in case he has encountered this, and if not, hopefully can help us log a PR in the appropriate place.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not a bug, but just differences in what the tooling in Business Application Studio expects/requires the folder structure to be vs. what works in the mta.yaml for deployment. The main issue is that the HANA native tooling expects the db folder to be in the root of the project not within /gen. So you can change the CAP project definition to create the /gen folder within the module folders (like it did originally) and then the HANA tooling in BAS. But then things are lined up exactly right for deployment to Cloud Foundry. You need to make additional changes to the mta.yaml. We cover those additional changes for this tutorial mission in this optional tutorial step that covers deployment as well:
Deploy CAP with SAP HANA Cloud project as MTA | Tutorials for SAP Developers
Thanks a bunch for commenting Thomas. The extra tutorial helped and I can't help but wonder why this simplified project structure isn't the default. It certainly eliminates a lot of subdirectories from the final product. I also want to acknowledge Kevin's excellent blog that highlights this solution as well (along with some great CDS bootstrap details).
Hello!
Had the same issue, and for future reference, the issue was with this part of the MTA:
- name: APP-db-deployer
type: hdb
path: gen/db
requires:
- name: APP_SRV-db
properties:
TARGET_CONTAINER: ~{hdi-container-name}
parameters:
buildpack: nodejs_buildpack
For some reason the path of the deployer changed from "gen/db" (generated file) to "db", and this is why it does not find the "package.json" file. I think the issue is with the command "cds add hana", that changes this on MTA,
Hope it can help someone with this issue in the future.
Best regards,
Rafael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The tutorial from Thomas Jung has been fixed in the meanwhile.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thulja,
I am still facing the problem in deploying. I also followed the same tutorial. Is there any step by step guide which I can follow.
Hi James,
I followed the steps which you have provided for the resolution but I found csn.json and _i18n folder were already present in srv folder. Not sure if I am doing something wrong.
Thanks in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.