Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why @cap-js/openapi and @cap-js/asyncapi peer dependencies, when without the the plugin does not start #112

Open
oklemenz2 opened this issue Jan 23, 2025 · 2 comments · May be fixed by #113
Assignees

Comments

@oklemenz2
Copy link

Error:

Error: Cannot find module '@cap-js/asyncapi'
Require stack:
- /Users/D045365/Documents/git/AFC/api/node_modules/@cap-js/ord/lib/metaData.js
- /Users/D045365/Documents/git/AFC/api/node_modules/@cap-js/ord/lib/index.js
- /Users/D045365/Documents/git/AFC/api/node_modules/@cap-js/ord/lib/plugin.js
- /Users/D045365/Documents/git/AFC/api/node_modules/@cap-js/ord/cds-plugin.js
- /Users/D045365/Documents/git/AFC/api/node_modules/@sap/cds/lib/plugins.js
- /Users/D045365/Documents/git/AFC/api/node_modules/@sap/cds/lib/index.js
- /Users/D045365/Documents/git/AFC/api/node_modules/@sap/cds/bin/serve.js
    at Function._resolveFilename (node:internal/modules/cjs/loader:1249:15)
    at Function._load (node:internal/modules/cjs/loader:1075:27)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:219:24)
    at Module.<anonymous> (node:internal/modules/cjs/loader:1340:12)

Not mentioned in README at all, only installl @cap-js/ord should be sufficient

@swennemers
Copy link
Contributor

@RamIndia , @RoshniNaveenaS , why are these dependencies not listed directly?

@zongqichen
Copy link
Contributor

Hi @RamIndia and @RoshniNaveenaS,

From my observations, @cap-js/openapi and @cap-js/asyncapi are not fundamentally the same as @sap/cds-dk. In my point of view, we should not assume every user environment has pre-installed them. So I would suggest to move them to dependencies, as same as package lodash. I've submitted PR #113 for this change. Could you please review it when convenient? Thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants