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

ERROR could not build the "sapcapirebook" module

sv7en
Product and Topic Expert
Product and Topic Expert
0 Likes
1,265

Hi,

In the Business Application Studio, I am trying to build a CAP simple-bookshop application.
after I run 'npm run mta-build', I get the error message:

 

 

[2024-06-26 03:31:24]  INFO executing the "npm run build:cf" command...

> book@0.0.1 build:cf
> ui5 build preload --clean-dest --config ui5-deploy.yaml --include-task=generateCachebusterInfo

sh: 1: ui5: not found
[2024-06-26 03:31:24] ERROR could not build the "sapcapirebook" module: could not execute the "npm run build:cf" command: exit status 127
make: *** [Makefile_20240626033043.mta:37: sapcapirebook] Error 1
Error: could not build the MTA project: could not execute the "make -f Makefile_20240626033043.mta p=cf mtar= strict=true mode= t=\"./\"" command: exit status 2

 

 

My scripts in package.json:

 

 

  "scripts": {
    "start": "cds run",
    "deploy": "cds deploy -2 sqlite --no-save",
    "watch": "cds watch",
    "build": "cds build",
    "mta-build": "mbt build -t ./",
    "mta-deploy": "cf deploy simple-bookshop-oidc_1.1.5.mtar --delete-services",
    "undeploy": "cf undeploy simple-bookshop-oidc --delete-services --delete-service-keys",
    "mta-deploy:force": "cf deploy simple-bookshop-oidc_1.1.5.mtar --version-rule ALL",
    "build:cf": "ui5 build preload --clean-dest --config ui5-deploy.yaml --include-task=generateCachebusterInfo"
  },

 

 

repo:
https://github.tools.sap/I560824/simple-bookshop.git
branch:
change-history-1.8.0-milestone

Can any one advice, what am i doing wrong here and how to fix this?
By the way, some time ago, I was able to build normally, but this error occurred a few days ago.

Thanks in advance!

Regards,

Wenjun




Accepted Solutions (0)

Answers (2)

Answers (2)

ManuelKlein
Associate
Associate
0 Likes

Upgrading to the latest stable Node.js version fixed it for me. The older version worked with other app components, but the UI required a version >20.0.0.

MioYasutake
SAP Champion
SAP Champion
0 Likes

@sv7en 

Have you executed 'npm install'?

sv7en
Product and Topic Expert
Product and Topic Expert
0 Likes
Yes, I have executed 'npm install'. And then 'npm run mta-build'