cancel
Showing results for 
Search instead for 
Did you mean: 

context sap.common with syntax errors on version @sap/cds@3.7.1 ( npm)

Hi experts,

I try to follow DJ Adams (qmacro) blog posts (https://blogs.sap.com/2019/03/06/annotated-links-episode-2-of-hands-on-sap-dev-with-qmacro/), which is quite cool. But I got a problem, and I don't know how to solve it.

I created a new project using cds init. After that I open my project in vscode and created a new cds as mentioned in the tutorial (cat-service.cds) and start to adding my first line of coding:

using { Country, managed } from '@sap/cds/common';

But no I got an error (Artifact "managed" has not been found).

So I went to node_modules/@sap/cds/common.cds. But this looks complete different that tis one which used in tutorial and the next problem, it contains many syntax errors

for example:

- no artifact with name CodeList

- all aspects are marked red with this error message

Extraneous '{', expecting '@', ABSTRACT, ACTION, ANNOTATE, ANNOTATION, CONST, CONTEXT, DEFINE, ENTITY, EXTEND, FUNCTION, SERVICE, TABLE, TEMPORARY, TYPE, VIEW

I'm really new on this development, so honestly, I have no idea, what is wrong. Maybe someone can help me. Would be great, because I really like to go forward with CAPM.

View Entire Topic
chgeo
Advisor
Advisor

Hi,

this seems to me like an old VSCode extension running against quite new CDS with the new 'aspect' keyword. An update of this plugin (1.1.4) should arrive on tools download page by 25.4. So stay tuned here, and update the plugin once VSCode requests it.

Regards,

Christian