Closed MichaelFlucher closed 1 month ago
Hello,
This could be because of a missing dev-dependency as described in the release notes, if this doesn't help resolve your issue please share your project so that we can reproduce it.
Best regards, Maha
Hi @smahati,
Thanks for the hint. I thought cds add typescript
would be enough. Adding @cap-js/cds-types
fixed the issue.
Should this issue stay open, to add this information to the documentation?
BR,
Michael
Hi @MichaelFlucher,
when I run cds add typescript
on a project with cds-dk
version 8.1 I get @cap-js/cds-types
added to my devDependencies
automatically. Does this behave differently for you?
Best regards, Steffen
Hello,
As we have not heard back from you, I will close this issue for now. Please create a new issue if you need further support.
Thanks & Best Regards, Mahati
Hi @MichaelFlucher,
when I run
cds add typescript
on a project withcds-dk
version 8.1 I get@cap-js/cds-types
added to mydevDependencies
automatically. Does this behave differently for you?Best regards, Steffen
It does indeed. Everytime I run npm install
, I get the error again:
error TS7016: Could not find a declaration file for module '@sap/cds'.
So the did not come from a missing @cap-js/cds-types
, but the symbolic link was not created.
I have to run ln -s ../@cap-js/cds-types ./node_modules/@types/sap__cds
everytime.
I just set up a new CAP Project using @sap/cds with version 8.1.0 and also @sap/cds-dk with ^8. According to https://cap.cloud.sap/docs/node.js/typescript#enable-typescript-support I should use something like
But this gives an error, that the declaration is not there anymore: error TS7016: Could not find a declaration file for module '@sap/cds'.
Downgrading to v7 works again.