cancel
Showing results for 
Search instead for 
Did you mean: 

CAP mta.yaml db module + HDI missing

Dogan
Participant

Hi guys,

i have a question regardings this tutorial: https://developers.sap.com/tutorials/hana-cloud-cap-create-project.html

When creating a new CAP Project with the wizard, the mta.yaml file should be populated with the necessary dependencies. But when i create new project some errors occur and the mta.yaml is missing some data.

This is how it should look like (Screenshot from the tutorial)

And this is how it actually looks like:

What is the cause of this and how can i fix it?

Here are the errors i get, after creating a new Project:

{"message":"@sap/cap-project:app generator failed - process.on(uncaughtException) process.on(uncaughtException) env.on(error) [INTERNAL ERROR] this.fsUtil.readYAML is not a function\nPlease report this error.\n","stack":"TypeError: env.on(error) [INTERNAL ERROR] this.fsUtil.readYAML is not a function\nPlease report this error.\n\n at TemplateUtil.mergeYAML (/extbin/npm/globals/lib/node_modules/@sap/cds-dk/lib/init/util/templateUtil.js:108:69)\n at HanaTemplate.runMTAMerging (/extbin/npm/globals/lib/node_modules/@sap/cds-dk/lib/init/template/hana/index.js:44:33)\n at async HanaTemplate.run (/extbin/npm/globals/lib/node_modules/@sap/cds-dk/lib/init/template/hana/index.js:95:9)\n at async Spinner.run (/extbin/npm/globals/lib/node_modules/@sap/cds-dk/lib/init/util/spinner.js:36:20)\n at async CDSGenerator._process (/extbin/npm/globals/lib/node_modules/@sap/cds-dk/lib/init/index.js:216:17)\n at async CDSGenerator.stepInit (/extbin/npm/globals/lib/node_modules/@sap/cds-dk/lib/init/index.js:153:9)\n at async TheiaCdsGenerator.writing (/extbin/npm/globals/lib/node_modules/@sap/generator-cap-project/generators/app/TheiaCdsGenerator.js:113:13)"}

{"message":"@sap/cap-project:app generator failed - process.on(uncaughtException) env.on(error) [INTERNAL ERROR] this.fsUtil.readYAML is not a function\nPlease report this error.\n","stack":"TypeError: env.on(error) [INTERNAL ERROR] this.fsUtil.readYAML is not a function\nPlease report this error.\n\n at TemplateUtil.mergeYAML (/extbin/npm/globals/lib/node_modules/@sap/cds-dk/lib/init/util/templateUtil.js:108:69)\n at HanaTemplate.runMTAMerging (/extbin/npm/globals/lib/node_modules/@sap/cds-dk/lib/init/template/hana/index.js:44:33)\n at async HanaTemplate.run (/extbin/npm/globals/lib/node_modules/@sap/cds-dk/lib/init/template/hana/index.js:95:9)\n at async Spinner.run (/extbin/npm/globals/lib/node_modules/@sap/cds-dk/lib/init/util/spinner.js:36:20)\n at async CDSGenerator._process (/extbin/npm/globals/lib/node_modules/@sap/cds-dk/lib/init/index.js:216:17)\n at async CDSGenerator.stepInit (/extbin/npm/globals/lib/node_modules/@sap/cds-dk/lib/init/index.js:153:9)\n at async TheiaCdsGenerator.writing (/extbin/npm/globals/lib/node_modules/@sap/generator-cap-project/generators/app/TheiaCdsGenerator.js:113:13)"}

{"message":"@sap/cap-project:app generator failed - env.on(error) [INTERNAL ERROR] this.fsUtil.readYAML is not a function\nPlease report this error.\n","stack":"TypeError: env.on(error) [INTERNAL ERROR] this.fsUtil.readYAML is not a function\nPlease report this error.\n\n at TemplateUtil.mergeYAML (/extbin/npm/globals/lib/node_modules/@sap/cds-dk/lib/init/util/templateUtil.js:108:69)\n at HanaTemplate.runMTAMerging (/extbin/npm/globals/lib/node_modules/@sap/cds-dk/lib/init/template/hana/index.js:44:33)\n at async HanaTemplate.run (/extbin/npm/globals/lib/node_modules/@sap/cds-dk/lib/init/template/hana/index.js:95:9)\n at async Spinner.run (/extbin/npm/globals/lib/node_modules/@sap/cds-dk/lib/init/util/spinner.js:36:20)\n at async CDSGenerator._process (/extbin/npm/globals/lib/node_modules/@sap/cds-dk/lib/init/index.js:216:17)\n at async CDSGenerator.stepInit (/extbin/npm/globals/lib/node_modules/@sap/cds-dk/lib/init/index.js:153:9)\n at async TheiaCdsGenerator.writing (/extbin/npm/globals/lib/node_modules/@sap/generator-cap-project/generators/app/TheiaCdsGenerator.js:113:13)"}

Thanks and regards,

Cemre

gregorw
Active Contributor
0 Kudos

Can you confirm that you ticked the checkbox "Configuration for SAP HANA Deployment" in the Step 3?

Dogan
Participant
0 Kudos

Hi gregorw,

yes, i ticked the checkbox just like in the tutorial.

Regards,

Cemre

jibinjoy21
Explorer
0 Kudos

Hi Cemre,

Any Luck with this Issue . I am getting same error

iwona_hahn
Product and Topic Expert
Product and Topic Expert
0 Kudos

Maybe thomas.jung as the author of the tutorial can help?

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

This tutorial just uses the standard CAP project template. It looks like you are getting some sort of failure in the template wizard itself. You probably need to enter a support ticket if the wizard is failing for you. But I will say I can't recreate the error. I just ran the wizard in my own account and it works fine. It's also odd that your mta.yaml seems to be missing the header comment information as well.

Dogan
Participant

Hi thomas.jung,

thanks for your input.

It is really weird and i don't know why its happening. I will create a ticket and hope that they can find the root of the cause.

Regards

Cemre

BenedictV
Active Contributor
0 Kudos

Hi Cemre,

I have the exact same error and the incomplete MTA file. One thing I observed was, this error only pops up when I choose the features 'Configuration for SAP HANA Deployment' and 'MTA based SAP BTP Deployment', together.

I hope you can update this discussion with any resolution you get from support.

Arijit_Laha
Explorer
0 Kudos

Hello Cemre,

Can you please let me know how your problem was fixed? As I am also facing the same issue while trying to create the CAP project using Wizard. While creating the CAP Project, I have selected "CI/CD Pipeline Integration", "Configuration for SAP HANA Deployment" and "MTA based SAP Business Technology Platform Deployment". But the mta.yaml file is not getting generated properly. It is always getting truncated after line number 26.

Thanks,

Arijit

Dogan
Participant
0 Kudos

Hi Arijit,

the best way is to open a ticket. Thats what i did.

You have to hope for a hotifx...unfortunately

Thanks and regards,

Cemre

Accepted Solutions (1)

Accepted Solutions (1)

Dogan
Participant
0 Kudos

As of now the problem was fixed. I didn't get an answer on what the problem was, but here is the answer i got:

For me its working now, although the header comment information is still missing.

I hope it was fixed for anyone having the same problem.

Best regards,

Cemre

Answers (0)