Skip to content

fix: add qs as dependency #1067

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

Merged
merged 1 commit into from
May 19, 2025
Merged

fix: add qs as dependency #1067

merged 1 commit into from
May 19, 2025

Conversation

ja-ka
Copy link
Contributor

@ja-ka ja-ka commented May 19, 2025

After upgrading to 5.5.1 using the module when installed via npm install --omit=dev fails with the following error:

2025-05-19 09:32:24.892 | at Module._compile (node:internal/modules/cjs/loader:1562:14) |  
-- | -- | --
  |   | 2025-05-19 09:32:24.892 | at Object.<anonymous> (/home/vcap/app/node_modules/express-openapi-validator/dist/middlewares/parsers/req.parameter.mutator.js:9:14) |  
  |   | 2025-05-19 09:32:24.892 | at require (node:internal/modules/helpers:136:16) |  
  |   | 2025-05-19 09:32:24.892 | at Module.require (node:internal/modules/cjs/loader:1335:12) |  
  |   | 2025-05-19 09:32:24.892 | at wrapModuleLoad (node:internal/modules/cjs/loader:217:24) |  
  |   | 2025-05-19 09:32:24.892 | at TracingChannel.traceSync (node:diagnostics_channel:322:14) |  
  |   | 2025-05-19 09:32:24.892 | at Function.<anonymous> (node:internal/modules/cjs/loader:1070:27) |  
  |   | 2025-05-19 09:32:24.892 | at Function._resolveFilename (node:internal/modules/cjs/loader:1244:15) |  
  |   | 2025-05-19 09:32:24.892 | - /home/vcap/app/src/index.js |  
  |   | 2025-05-19 09:32:24.892 | - /home/vcap/app/src/server/index.js |  
  |   | 2025-05-19 09:32:24.892 | - /home/vcap/app/src/server/middlewares/openApiValidation.js |  
  |   | 2025-05-19 09:32:24.891 | - /home/vcap/app/node_modules/express-openapi-validator/dist/index.js |  
  |   | 2025-05-19 09:32:24.891 | - /home/vcap/app/node_modules/express-openapi-validator/dist/openapi.validator.js |  
  |   | 2025-05-19 09:32:24.891 | - /home/vcap/app/node_modules/express-openapi-validator/dist/middlewares/index.js |  
  |   | 2025-05-19 09:32:24.891 | - /home/vcap/app/node_modules/express-openapi-validator/dist/middlewares/openapi.request.validator.js |  
  |   | 2025-05-19 09:32:24.891 | - /home/vcap/app/node_modules/express-openapi-validator/dist/middlewares/parsers/req.parameter.mutator.js |  
  |   | 2025-05-19 09:32:24.891 | Require stack: |  
  |   | 2025-05-19 09:32:24.891 | Error: Cannot find module 'qs'

qs is installed only via devDependencies and thus not available if dev dependencies are omitted during install.

% npm ls qs
express-openapi-validator@5.5.1 /ja-ka/express-openapi-validator
├─┬ body-parser@2.2.0
│ └── qs@6.14.0
├─┬ coveralls@3.1.1
│ └─┬ request@2.88.2
│   └── qs@6.5.2
├─┬ express@5.1.0
│ └── qs@6.14.0 deduped
└─┬ supertest@7.1.0
  └─┬ superagent@9.0.2
    └── qs@6.14.0 deduped

package.json:

  "dependencies": {
    "@apidevtools/json-schema-ref-parser": "^12.0.1",
    "@types/multer": "^1.4.12",
    "ajv": "^8.17.1",
    "ajv-draft-04": "^1.0.0",
    "ajv-formats": "^3.0.1",
    "content-type": "^1.0.5",
    "json-schema-traverse": "^1.0.0",
    "lodash.clonedeep": "^4.5.0",
    "lodash.get": "^4.4.2",
    "media-typer": "^1.1.0",
    "multer": "^1.4.5-lts.2",
    "ono": "^7.1.3",
    "path-to-regexp": "^8.2.0"
  },
  "devDependencies": {
    "@types/cookie-parser": "^1.4.8",
    "@types/express": "5.0.1",
    "@types/mocha": "^10.0.10",
    "@types/morgan": "^1.9.9",
    "@types/node": "^22.15.3",
    "@types/supertest": "^6.0.3",
    "body-parser": "^2.2.0",
    "chai": "^4.3.6",
    "commitizen": "^4.3.1",
    "cookie-parser": "^1.4.7",
    "coveralls": "^3.1.1",
    "express": "^5.1.0",
    "mocha": "^11.2.2",
    "morgan": "^1.10.0",
    "nodemon": "^3.1.10",
    "nyc": "^17.1.0",
    "prettier": "^3.5.3",
    "rimraf": "^6.0.1",
    "source-map-support": "0.5.21",
    "supertest": "^7.1.0",
    "ts-node": "^10.9.2",
    "typescript": "^5.8.3"
  },

@spaghetti-is-pasta
Copy link

closes #1068

@cdimascio cdimascio merged commit eef4922 into cdimascio:master May 19, 2025
5 checks passed
@ja-ka ja-ka deleted the fix/qs-as-dep branch May 20, 2025 04:35
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 this pull request may close these issues.

3 participants