Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build the Components #33

Open
Juancho1162 opened this issue Dec 3, 2024 · 1 comment
Open

Build the Components #33

Juancho1162 opened this issue Dec 3, 2024 · 1 comment

Comments

@Juancho1162
Copy link

After running ">npm run build:mbt" I obtain the following output: (I installed all the dependencies but it always shows the same output):

"

[email protected] build:mbt
mbt build

[2024-12-03 11:04:13] INFO Cloud MTA Build Tool version 1.2.33
[2024-12-03 11:04:13] INFO generating the "Makefile_20241203110413.mta" file...
[2024-12-03 11:04:13] INFO done
[2024-12-03 11:04:13] INFO executing the "make -f Makefile_20241203110413.mta p=cf mtar= strict=true mode=" command...
[2024-12-03 11:04:13] INFO validating the MTA project
[2024-12-03 11:04:13] INFO running the "before-all" build...
[2024-12-03 11:04:13] INFO executing the "npm run build" command...

[email protected] build
npm run setup && npm run build:cds && npm run build:ui && npm run build:ts

[email protected] setup
npm i --prefix ../../code/app/ui

.....
up to date, audited 1389 packages in 5s

157 packages are looking for funding
run npm fund for details

19 vulnerabilities (4 low, 4 moderate, 11 high)

To address all issues, run:
npm audit fix

Run npm audit for details.

[email protected] build:cds
npm run build --prefix ../../code

[email protected] build
cds-ts build --profile production

building project [/home/juancho/workspace/btp-cap-genai-rag/single-tenant/code], clean [true]
cds-dk [8.5.0], cds [8.5.0], compiler [5.5.0], home [/home/juancho/.nvm/versions/node/v20.18.0/lib/node_modules/@sap/cds-dk/node_modules/@sap/cds]

{
build: {
target: 'gen',
tasks: [
{ for: 'nodejs', src: 'srv', options: { model: ['db', 'srv', 'app'] }}
]
}
}

done > wrote output to:
gen/srv/.cdsrc.json
gen/srv/.npmrc
gen/srv/package.json
gen/srv/srv/_i18n/i18n.json
gen/srv/srv/constants.ts
gen/srv/srv/csn.json
gen/srv/srv/mail-insights-service.ts
gen/srv/srv/odata/v4/MailInsightsService.xml
gen/srv/srv/schemas.ts
gen/srv/srv/types.ts
gen/srv/srv/utils/ai-core.ts

build completed in 260 ms

.

[email protected] build:ui
npm run build --prefix ../../code/app/ui/ && npm run copy --prefix ../../code/app/ui/

[email protected] build
ui5 build --clean-dest

info graph:helpers:ui5Framework Using SAPUI5 version: 1.117.1
info ProjectBuilder Preparing build for project genai-mail-insights-ui
info ProjectBuilder Target directory: ./dist
.info ProjectBuilder Cleaning target directory...
info Project 1 of 1: ❯ Building application project genai-mail-insights-ui...
info genai-mail-insights-ui › Running task escapeNonAsciiCharacters...
info genai-mail-insights-ui › Running task replaceCopyright...
info genai-mail-insights-ui › Running task replaceVersion...
info genai-mail-insights-ui › Running task ui5-tooling-transpile-task...
warn builder:custom-task:ui5-tooling-transpile-task Babel uses regenerator runtime to transpile async/await for older target browsers. As this is not CSP compliant consider the usage of transformAsyncToPromise to convert async/await to Promises!
Browserslist: caniuse-lite is outdated. Please run:
npx update-browserslist-db@latest
Why you should do it regularly: https://github.com/browserslist/update-db#readme
info genai-mail-insights-ui › Running task minify...
info genai-mail-insights-ui › Running task generateFlexChangesBundle...
info genai-mail-insights-ui › Running task generateComponentPreload...
info genai-mail-insights-ui › Running task ui5-task-zipper...
info ProjectBuilder Build succeeded in 614 ms
info ProjectBuilder Executing cleanup tasks...

[email protected] copy
npx shx mkdir -p ../html5-deployer/resources/ && npx shx cp -rf ./dist/*.zip ../html5-deployer/resources/

..

[email protected] build:ts
tsc -p ../../code

../../code/srv/mail-insights-service.ts(1,17): error TS2307: Cannot find module '@sap/cds' or its corresponding type declarations.
../../code/srv/mail-insights-service.ts(2,67): error TS2307: Cannot find module '@sap-ai-sdk/langchain' or its corresponding type declarations.
../../code/srv/mail-insights-service.ts(4,19): error TS2307: Cannot find module 'zod' or its corresponding type declarations.
../../code/srv/mail-insights-service.ts(5,30): error TS2307: Cannot find module 'uuid' or its corresponding type declarations.
../../code/srv/mail-insights-service.ts(6,36): error TS2307: Cannot find module '@langchain/core/prompts' or its corresponding type declarations.
../../code/srv/mail-insights-service.ts(7,40): error TS2307: Cannot find module '@langchain/core/output_parsers' or its corresponding type declarations.
../../code/srv/mail-insights-service.ts(8,36): error TS2307: Cannot find module 'langchain/output_parsers' or its corresponding type declarations.
../../code/srv/mail-insights-service.ts(15,35): error TS2307: Cannot find module '#cds-models/MailInsightsService' or its corresponding type declarations.
../../code/srv/mail-insights-service.ts(31,14): error TS2339: Property 'on' does not exist on type 'MailInsights'.
../../code/srv/mail-insights-service.ts(32,14): error TS2339: Property 'on' does not exist on type 'MailInsights'.
../../code/srv/mail-insights-service.ts(33,14): error TS2339: Property 'on' does not exist on type 'MailInsights'.
../../code/srv/mail-insights-service.ts(34,14): error TS2339: Property 'on' does not exist on type 'MailInsights'.
../../code/srv/mail-insights-service.ts(35,14): error TS2339: Property 'on' does not exist on type 'MailInsights'.
../../code/srv/mail-insights-service.ts(36,14): error TS2339: Property 'on' does not exist on type 'MailInsights'.
../../code/srv/mail-insights-service.ts(37,14): error TS2339: Property 'on' does not exist on type 'MailInsights'.
../../code/srv/mail-insights-service.ts(50,36): error TS2339: Property 'entities' does not exist on type 'MailInsights'.
../../code/srv/mail-insights-service.ts(51,33): error TS2552: Cannot find name 'SELECT'. Did you mean 'onselect'?
../../code/srv/mail-insights-service.ts(74,36): error TS2339: Property 'entities' does not exist on type 'MailInsights'.
../../code/srv/mail-insights-service.ts(76,32): error TS2552: Cannot find name 'SELECT'. Did you mean 'onselect'?
../../code/srv/mail-insights-service.ts(107,29): error TS2552: Cannot find name 'SELECT'. Did you mean 'onselect'?
../../code/srv/mail-insights-service.ts(149,36): error TS2339: Property 'entities' does not exist on type 'MailInsights'.
../../code/srv/mail-insights-service.ts(154,19): error TS2304: Cannot find name 'INSERT'.
../../code/srv/mail-insights-service.ts(156,41): error TS2552: Cannot find name 'SELECT'. Did you mean 'onselect'?
../../code/srv/mail-insights-service.ts(194,36): error TS2339: Property 'entities' does not exist on type 'MailInsights'.
../../code/srv/mail-insights-service.ts(195,32): error TS2552: Cannot find name 'SELECT'. Did you mean 'onselect'?
../../code/srv/mail-insights-service.ts(213,36): error TS2339: Property 'entities' does not exist on type 'MailInsights'.
../../code/srv/mail-insights-service.ts(214,32): error TS2552: Cannot find name 'SELECT'. Did you mean 'onselect'?
../../code/srv/mail-insights-service.ts(233,35): error TS2552: Cannot find name 'UPDATE'. Did you mean 'Date'?
../../code/srv/mail-insights-service.ts(250,36): error TS2339: Property 'entities' does not exist on type 'MailInsights'.
../../code/srv/mail-insights-service.ts(251,34): error TS2552: Cannot find name 'UPDATE'. Did you mean 'Date'?
../../code/srv/mail-insights-service.ts(267,36): error TS2339: Property 'entities' does not exist on type 'MailInsights'.
../../code/srv/mail-insights-service.ts(268,34): error TS2304: Cannot find name 'DELETE'.
../../code/srv/mail-insights-service.ts(330,39): error TS2339: Property 'entities' does not exist on type 'MailInsights'.
../../code/srv/mail-insights-service.ts(634,32): error TS2339: Property 'entities' does not exist on type 'MailInsights'.
../../code/srv/mail-insights-service.ts(637,19): error TS2304: Cannot find name 'SELECT'.
../../code/srv/schemas.ts(1,19): error TS2307: Cannot find module 'zod' or its corresponding type declarations.
../../code/srv/schemas.ts(36,21): error TS7006: Parameter 'number' implicitly has an 'any' type.
../../code/srv/schemas.ts(42,21): error TS7006: Parameter 'number' implicitly has an 'any' type.
../../code/srv/schemas.ts(109,41): error TS7006: Parameter 'responseBody' implicitly has an 'any' type.
../../code/srv/schemas.ts(115,41): error TS7006: Parameter 'responseBody' implicitly has an 'any' type.
../../code/srv/schemas.ts(123,45): error TS7006: Parameter 'responseBody' implicitly has an 'any' type.
../../code/srv/types.ts(1,19): error TS2307: Cannot find module 'zod' or its corresponding type declarations.
../../code/srv/utils/ai-core.ts(1,19): error TS2307: Cannot find module '@sap/xsenv' or its corresponding type declarations.
../../code/srv/utils/ai-core.ts(12,8): error TS2307: Cannot find module '@sap-ai-sdk/ai-api' or its corresponding type declarations.
[2024-12-03 11:04:22] ERROR the "before-all"" build failed: could not execute the "npm run build" command: exit status 2
make: *** [Makefile_20241203110413.mta:28: pre_build] Error 1
[2024-12-03 11:04:22] ERROR could not build the MTA project: could not execute the "make -f Makefile_20241203110413.mta p=cf mtar= strict=true mode=" command: exit status 2
Error: could not build the MTA project: could not execute the "make -f Makefile_20241203110413.mta p=cf mtar= strict=true mode=" command: exit status 2"

@kay-schmitteckert
Copy link
Contributor

Hey @Juancho1162, Thanks for reaching out.
Can you try removing your .lock files, the node_modules and make a fresh, clean built? Which node version are you using?

Best
Kay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants