The @cap-js/attachments package is a CDS plugin that provides out-of-the box asset storage and handling by using an aspect Attachments. It also provides a CAP-level, easy to use integration of the SAP Object Store.
Apache License 2.0
13
stars
4
forks
source link
Attachements plugin with cds typer throws error #68
When trying to integrate the attachments plugin into our CAP application we get the following errors:
`@cds-models/application/index.ts:414:46 - error TS2344: Type 'Attachments' does not satisfy the constraint 'readonly any[]'.
Type 'Attachments' is missing the following properties from type 'readonly any[]': length, concat, join, slice, and 20 more.
414 attachments?: _.Composition.of.many<.Attachments>;
and:
@cds-models/index.ts:81:78 - error TS2552: Cannot find name '_AttachmentAspect'. Did you mean '_AttachmentsAspect'?
81 export class Attachments extends _managedAspect(_cuidAspect(_MediaDataAspect(_AttachmentAspect(__.Entity)))) {static drafts: typeof Attachments}`
The project is implemented with typescript and is using cds-typer plugin from sap (https://github.com/cap-js/cds-typer) to define types. After we integrated the attachements plugin via npm add @cap-js/attachments, then integrated it into our model and tryed to deploye it to our sqlite data base. We get the error written above.
When trying to integrate the attachments plugin into our CAP application we get the following errors:
and:
The project is implemented with typescript and is using cds-typer plugin from sap (https://github.com/cap-js/cds-typer) to define types. After we integrated the attachements plugin via npm add @cap-js/attachments, then integrated it into our model and tryed to deploye it to our sqlite data base. We get the error written above.
We are using the following versions: