SAP-samples / cloud-cap-risk-management

The SAP Risk Management example applications show how to deploy a CAP (SAP Cloud Application Programming model) application to Cloud Foundry and Kyma.
Apache License 2.0
67 stars 94 forks source link

Errors when running ext-service-s4hc-suppliers-ui #24

Closed jcailan closed 2 years ago

jcailan commented 2 years ago

Hi,

I did a clone and npm install of below cap project: https://github.com/SAP-samples/cloud-cap-risk-management/tree/ext-service-s4hc-suppliers-ui

And immediately, I get below errors:

jhodel: cloud-cap-risk-management git@ext-service-s4hc-suppliers-ui > cds watch

cds serve all --with-mocks --in-memory? 
watching: cds,csn,csv,ts,mjs,cjs,js,json,properties,edmx,xml,env,css,gif,html,jpg,png,svg... 
live reload enabled for browsers 
        _______________________

[ERROR] db/schema.cds:29:9-14: Element or variable “risks” has not been found (in entity:“sap.ui.riskmanagement.Suppliers”/element:“risks”)
[ERROR] db/schema.cds:29:17-28: No artifact has been found with name “Association” (in entity:“sap.ui.riskmanagement.Suppliers”/element:“risks”)
[ERROR] db/schema.cds:29:29-31: Extraneous TO, expecting ‘,’, ‘.’, ‘:’, ‘(’, ‘}’, ‘@’
jhodel: cloud-cap-risk-management git@ext-service-s4hc-suppliers-ui > cds version
@sap/cds: 5.5.4
@sap/cds-compiler: 2.7.0
@sap/cds-dk: 4.8.1
@sap/cds-foss: 3.0.0
@sap/xssec: 3.2.8
Node.js: v14.19.0
cpapp: 1.0.0
home: /Users/jhodel/Downloads/cloud-cap-risk-management/node_modules/@sap/cds

Upgrading to "@sap/cds": "^6.0.4" fixed the issue though.

Thanks and regards, Jhodel

smahati commented 2 years ago

Hi @jcailan,

Thank you for reporting this issue, I will update the branches to use the latest version of CDS which is what we recommend. You would also need to install two new dependencies as described here.

Best regards, Manju

jcailan commented 2 years ago

Hi @manjuX ,

No problem and thanks for the advice!

Thanks and regards, Jhodel

smahati commented 2 years ago

Hi @jcailan,

I updated the branches, here is the diff (link) for your reference.

I am closing the issue now. If you still have questions, feel free to open a new issue.

Best regards, Manju