SAP-samples / btp-developer-guide-cap

SAP BTP Developer’s Guide offers developer guidance to software developers on how to implement business applications using SAP Cloud Application Programming Model on SAP BTP Cloud Foundry and SAP BTP Kyma Runtime following the best practices.
Apache License 2.0
37 stars 22 forks source link

Error ERR_INVALID_ARG_TYPE in xsuaa-to-ams tutorial while doing cds build --production #118

Open GaneshGangatharan opened 1 month ago

GaneshGangatharan commented 1 month ago

INCIDENT-MANAGEMENT % cds build --production building project [/Users/MyUser/Documents/GitHub-Tool/INCIDENT-MANAGEMENT], clean [true] cds-dk [8.3.0], cds [8.3.1], compiler [5.3.2], home [/Users/MyUser/Documents/GitHub-Tool/INCIDENT-MANAGEMENT/node_modules/@sap/cds]

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

done > wrote output to: gen/db/package.json gen/db/src/.hdiconfig gen/db/src/gen/.hdiconfig gen/db/src/gen/.hdinamespace gen/db/src/gen/AdminService.Addresses.hdbview gen/db/src/gen/AdminService.Customers.hdbview gen/db/src/gen/AdminService.Incidents.hdbview gen/db/src/gen/AdminService.Incidents_conversation.hdbview gen/db/src/gen/AdminService.Status.hdbview gen/db/src/gen/AdminService.Status_texts.hdbview gen/db/src/gen/AdminService.Urgency.hdbview gen/db/src/gen/AdminService.Urgency_texts.hdbview gen/db/src/gen/DRAFT.DraftAdministrativeData.hdbtable gen/db/src/gen/ProcessorService.Addresses.hdbview gen/db/src/gen/ProcessorService.Customers.hdbview gen/db/src/gen/ProcessorService.DraftAdministrativeData.hdbview gen/db/src/gen/ProcessorService.Incidents.hdbview gen/db/src/gen/ProcessorService.Incidents_conversation.hdbview gen/db/src/gen/ProcessorService.Incidents_conversation_drafts.hdbtable gen/db/src/gen/ProcessorService.Incidents_drafts.hdbtable gen/db/src/gen/ProcessorService.Status.hdbview gen/db/src/gen/ProcessorService.Status_texts.hdbview gen/db/src/gen/ProcessorService.Urgency.hdbview gen/db/src/gen/ProcessorService.Urgency_texts.hdbview gen/db/src/gen/data/sap.capire.incidents-Addresses.csv gen/db/src/gen/data/sap.capire.incidents-Addresses.hdbtabledata gen/db/src/gen/data/sap.capire.incidents-Customers.csv gen/db/src/gen/data/sap.capire.incidents-Customers.hdbtabledata gen/db/src/gen/data/sap.capire.incidents-Incidents.conversation.csv gen/db/src/gen/data/sap.capire.incidents-Incidents.conversation.hdbtabledata ... 32 more. Run with DEBUG=build to show all files.

TypeError [ERR_INVALID_ARG_TYPE]: The "paths[0]" argument must be of type string. Received undefined at Object.resolve (node:path:1129:7) at Object.to (/usr/local/lib/node_modules/@sap/cds-dk/lib/build/plugin.js:136:37) at Object.compileCds (/Users/MyUser/Documents/GitHub-Tool/INCIDENT-MANAGEMENT/node_modules/@sap/ams-dev/src/cap/capAmsFlow.js:27:30) at async AmsBuildPlugin.build (/Users/MyUser/Documents/GitHub-Tool/INCIDENT-MANAGEMENT/node_modules/@sap/ams-dev/src/cap/AmsBuildPlugin.js:39:3) at async Promise.allSettled (index 0) at async BuildTaskEngine._executePipeline (/usr/local/lib/node_modules/@sap/cds-dk/lib/build/buildTaskEngine.js:159:29) at async BuildTaskEngine._executeBuildTasks (/usr/local/lib/node_modules/@sap/cds-dk/lib/build/buildTaskEngine.js:150:25) at async BuildTaskEngine.processTasks (/usr/local/lib/node_modules/@sap/cds-dk/lib/build/buildTaskEngine.js:59:33) at async build (/usr/local/lib/node_modules/@sap/cds-dk/lib/build/index.js:19:16) at async Object.build (/usr/local/lib/node_modules/@sap/cds-dk/bin/build.js:171:5) { code: 'ERR_INVALID_ARG_TYPE' }

singhabhi1999 commented 3 weeks ago

Hi @GaneshGangatharan ,

can you please share with me the application latest codebase. I need to check the application configurations.

Regards, Abhinav

miyasuta commented 2 weeks ago

@singhabhi1999 I am experiencing the same issue. My repository URL is below (branch: ams). https://github.com/miyasuta/incident-management-2411