on 2025 Feb 05 8:02 AM
I have created a CAP Project in SAP Business Application Studio (BAS) using the following steps:
The project was successfully created and was functioning as expected when running locally.
However, when attempting to execute mbt build to package the project for deployment, the following error occurs:
[2025-02-05 06:23:23] INFO validating the MTA project
[2025-02-05 06:23:23] ERROR the "mta.yaml" file is not valid:
line 33: the "gen/pg" path of the "sample-postgres-deployer" module does not exist
make: *** [Makefile_20250205062318.mta:46: validate] Error 1
Error: could not build the MTA project: could not execute the "make -f Makefile_20250205062318.mta p=cf mtar= strict=true mode=" command: exit status 2.
Notably, mbt build works fine for my other existing projects. The issue seems to be specific to this newly created project.
I would appreciate any insights into the root cause of this issue and any recommended resolution steps.
Thank you for your support.
Request clarification before answering.
Add the following command to mta.yaml. It will generate the gen/db folder.
build-parameters:
before-all:
- builder: custom
commands:
- npx cds build --production
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried executing that command. Still the folder is not getting created.
Giving the following logs when executed,
user: llcapm $ cds build --production
building project [/home/user/projects/llcapm], clean [true]
cds-dk [8.6.1], cds [8.7.1], compiler [5.7.4], home [/home/user/projects/llcapm/node_modules/@sap/cds]
{
build: {
target: 'gen',
tasks: [
{ for: 'nodejs', src: 'srv', options: { model: ['db', 'srv', 'app'] }}
]
}
}
done > wrote output to:
gen/srv/package-lock.json
gen/srv/package.json
gen/srv/srv/csn.json
gen/srv/srv/odata/v4/CatalogService.xml
build completed in 180 ms
User | Count |
---|---|
58 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.