cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP BTP CAP - Unable to create MTA file using BAS - Same issue with and without templates

LaurensSteffers
Participant
0 Kudos
3,255

Hi all,

I'm working on a specific security issue. To get to that point, I wanted to create a very basic application using CAP and expose the well known bookshop example as an odata service. No issues when done locally but when I want to create the MTA file, I keep getting the same error.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/user/.npm/_logs/2022-09-30T07_10_11_709Z-debug-0.log
[2022-09-30 07:10:21] ERROR the "before-all"" build failed: could not execute the "npx -p @sap/cds-dk cds build --production" command: exit status 1
make: *** [Makefile_20220930071011.mta:28: pre_build] Error 1
Error: could not build the MTA project: could not execute the "make -f Makefile_20220930071011.mta p=cf mtar= strict=true mode=" command: exit status 2

So I gathered some advice and here's what I did (following thomas.jung example with DAT160)

- First i tested it with the template of the bookshop replicating it from the GIT. Makefile issue kept popping up.

- I started from scratch (no git), created the cap app (using cds init etc), added a service file + datamodel, cds add mta, approuter etc, but the MTA file problem was still there.

- I contacted a colleague who did the same thing (from scratch, no git or anything, just simply creating the files). He tried to create the MTA file, and it worked on his side! No issues. We created a tar file and tried to do the same thing on my side when I imported it as a new project, but I had the issues with the MTA file.

- The difference was that I was on a trial account, he on a normal account. I'm currently fetching credentials for the normal account but I can't accept the fact that my trial account doesn't work 🙂

Any ideas regarding the MakeFile issue on BAS (not VSCode)? Just clueless. In the past when I followed DAT160, I didn't had issues and all generated without problems. But now...

Cheers and all the best

Laurens

Accepted Solutions (1)

Accepted Solutions (1)

gregorw
SAP Mentor
SAP Mentor
0 Kudos

Do you have the option for a local setup with VS Code?

LaurensSteffers
Participant
0 Kudos

gregor.wolf Just setup everything for the VSCode. I am able to generate the MTAR file. Deployment to the CF trial environment works as well. So I can now finally work on my initial issue 🙂

gregorw
SAP Mentor
SAP Mentor
0 Kudos

I hope the BAS Team will read this and fix the issue. Seems to be very unstable in the moment.

RaghavaReddy
Explorer
0 Kudos
Hi, Can you please provide me the steps to setup the VSCODE to generate the MTA project from the build artifacts in BAS (under trial account)?

Answers (0)