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

Error: Cannot find module 'cds-swagger-ui-express' #91

Closed
zongqichen opened this issue Jan 29, 2024 · 2 comments
Closed

Error: Cannot find module 'cds-swagger-ui-express' #91

zongqichen opened this issue Jan 29, 2024 · 2 comments

Comments

@zongqichen
Copy link

zongqichen commented Jan 29, 2024

Deploy cds-swagger-ui-express to production, it still appears the error: Error: Cannot find module 'cds-swagger-ui-express'.
Environment:

"dependencies": {
    "@sap/cds": "^7",
    "@sap/cds-hana": "^2",
    "@sap/xssec": "^3",
    "express": "^4",
    "passport": "^0",
    "cds-swagger-ui-express": "^0.8.0"
  },
  "devDependencies": {
    "@cap-js/sqlite": "^1",
    "@sap/cds-dk": "^7",
    "cds-swagger-ui-express": "^0.8.0"
  }
@zongqichen
Copy link
Author

The solution is removed cds-swagger-ui-express from devDependencies, as mentioned in #8 (comment)

@chgeo
Copy link
Owner

chgeo commented Jan 30, 2024

Thanks for letting us know about the effect. A module that is both a dependency and devDepencency can cause unpredictable behavior with npm I guess.

@chgeo chgeo closed this as completed Jan 30, 2024
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

No branches or pull requests

2 participants