fiori-elements-feature-showcase icon indicating copy to clipboard operation
fiori-elements-feature-showcase copied to clipboard

Missing dependency @sap/cds-foss

Open gb1 opened this issue 3 years ago • 1 comments

Hi,

I have installed CAP via npm i -g @sap/cds-dk and the cds command is working. I have then run npm install in the root directory.

When I run cds watch I get this error about a missing node dependency (I have tried npm install @sap/cds-foss also but get the same)

''' c:\gb\fiori_elements\fiori-elements-feature-showcase>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 _______________________

[cds] - model loaded from 18 file(s):

.\db\common.cds .\db\schema.cds .\srv\service.cds .\app\services.cds .\node_modules@sap\cds\common.cds .\app\featureShowcase\capabilities.cds .\app\featureShowcase\field-control.cds .\app\featureShowcase\labels.cds .\app\featureShowcase\layouts_RootEntities.cds .\app\featureShowcase\layouts_contacts.cds .\app\featureShowcase\layouts_RootEntityVariants.cds .\app\featureShowcase\layouts_GrandChildEntities.cds .\app\featureShowcase\layouts_ChildEntities3.cds .\app\featureShowcase\layouts_ChildEntities1.cds .\app\featureShowcase\layouts_ChildEntities2.cds .\app\featureShowcase\layouts_ChartDataEntities.cds .\app\featureShowcase\value-helps.cds .\app\featureShowcaseNavigationTarget\annotations.cds

[ERROR] Cannot find module '@sap/cds-foss' Require stack:

  • c:\gb\fiori_elements\fiori-elements-feature-showcase\node_modules@sap\cds\lib\utils\index.js
  • c:\gb\fiori_elements\fiori-elements-feature-showcase\node_modules@sap\cds\lib\index.js
  • c:\gb\fiori_elements\fiori-elements-feature-showcase\node_modules@sap\cds\bin\cds.js
  • C:\Users\Gregor\AppData\Roaming\npm\node_modules@sap\cds-dk\bin\cds.js
  • C:\Users\Gregor\AppData\Roaming\npm\node_modules@sap\cds-dk\bin\watch.js at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15) at Function.Module._load (internal/modules/cjs/loader.js:730:27) at Module.require (internal/modules/cjs/loader.js:957:19) at require (internal/modules/cjs/helpers.js:88:18) at Object.get uuid [as uuid] (c:\gb\fiori_elements\fiori-elements-feature-showcase\node_modules@sap\cds\lib\utils\index.js:8:43) at Object. (c:\gb\fiori_elements\fiori-elements-feature-showcase\node_modules@sap\cds\lib\req\context.js:1:61) at Module._compile (internal/modules/cjs/loader.js:1068:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10) at Module.load (internal/modules/cjs/loader.js:933:32) at Function.Module._load (internal/modules/cjs/loader.js:774:14) '''

gb1 avatar Dec 08 '21 22:12 gb1

Hi @gb1,

please excuse the late reply. Did you also just run 'npm i' to get the '@sap/cds' dependency? '@sap/cds-dk' is just the development toolkit for CAP.

Best regards, Marten

schiwekM avatar Dec 13 '21 20:12 schiwekM