Skip to Content
0
Jul 31, 2023 at 11:49 AM

CAP Typescript - @cap-js/typer namespace missing

164 Views

Hi,

I'm currently working on switching a project to the new typescript approach using @cap-js/typer. Unfortunately, when using the newly generated types it looks like the namespace is missing when performing CQL queries.

I'm using the same approach as described here in the documentation.

Code sample:

code.png

When the query get executed, it fails to due to the namespace not being present in the SQL query:

error.png

I'm using following package versions:

@cap-js/cds-typer: 0.5.0
@cap-js/sqlite: 1.0.1
@sap/cds: 7.1.0
@sap/cds-compiler: 4.0.2
@sap/cds-dk: 7.0.3
@sap/cds-dk (global): 7.0.3
@sap/cds-fiori: 1.0.0
@sap/cds-foss: 4.0.2
@sap/cds-mtxs: 1.9.2
@sap/eslint-plugin-cds: 2.6.3
@thevaluechain/cap-number-range: 1.1.5
Node.js: v16.19.0
home: /home/user/projects/icm-reuse-numberrange/node_modules/@sap/cds

Am I missing something here? Any pointers on how to get this resolved?

Geert-Jan

Attachments

code.png (48.8 kB)
error.png (52.2 kB)