on ‎2024 Jan 13 2:09 PM
Hello folks,
I am working on my first cap node.js private learning project. I try to build my application by running 'cds build', but it fails with following error message:
[cds] - cds-dk [7.3.0], cds [7.5.1], compiler [4.5.0], home [.../node_modules/@sap/cds]
[cds] - the following build tasks will be executed
[cds] - {
"build": {
"target": "gen",
"tasks": [
{"for":"nodejs", "src":"srv", "options":{"model":["db","srv","app"]}}
]
}
}
[cds] - done > wrote output to:
gen/srv/srv/_i18n/i18n.json
gen/srv/srv/csn.json
TypeError: cds.service.protocols.protocol4(...).startsWith is not a function
at NodejsBuildPlugin._isOdataProtocol (/usr/local/lib/node_modules/@sap/cds-dk/lib/build/provider/edmxBuildPlugin.js:54:53)
at /usr/local/lib/node_modules/@sap/cds-dk/lib/build/provider/edmxBuildPlugin.js:12:37
at Array.filter (<anonymous>)
at NodejsBuildPlugin.compileToEdmx (/usr/local/lib/node_modules/@sap/cds-dk/lib/build/provider/edmxBuildPlugin.js:12:14)
at NodejsBuildPlugin.build (/usr/local/lib/node_modules/@sap/cds-dk/lib/build/provider/nodejs/index.js:50:24)
at async Promise.allSettled (index 0)
at async BuildTaskEngine._executePipeline (/usr/local/lib/node_modules/@sap/cds-dk/lib/build/buildTaskEngine.js:157:29)
at async BuildTaskEngine._executeBuildTasks (/usr/local/lib/node_modules/@sap/cds-dk/lib/build/buildTaskEngine.js:148:25)
at async BuildTaskEngine.processTasks (/usr/local/lib/node_modules/@sap/cds-dk/lib/build/buildTaskEngine.js:57:33)
at async build (/usr/local/lib/node_modules/@sap/cds-dk/lib/build/index.js:20:16)<br>
Any hints how to analyze the issue and identify the problem are greatly appreciated.
Request clarification before answering.
This might be caused by an unfortunate version combination of sap/cds 7.5 and the older sap/cds-dk 7.3. Please update your global sap/cds-dk to latest 7.5. This might fix the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 7 | |
| 6 | |
| 5 | |
| 5 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.