{"record":{"id":"d7eb4c29b21dc1d1","repo":"quasarframework/quasar","slug":"the-devserver-https-prop-file-could-not-be-read","errorCode":null,"errorMessage":"The devServer.https.${prop} file could not be read. Removed the config.","messagePattern":"The devServer\\.https\\.(.+?) file could not be read\\. Removed the config\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"app-vite/lib/quasar-config-file.js","lineNumber":1461,"sourceCode":"        }\n      } else if (Object(cfg.devServer.https) === cfg.devServer.https) {\n        const { https } = cfg.devServer\n\n        // we now check if config is specifying a file path\n        // and we actually read the contents so we can later supply correct\n        // params to the node HTTPS server\n        ;['ca', 'pfx', 'key', 'cert'].forEach(prop => {\n          if (typeof https[prop] === 'string') {\n            try {\n              https[prop] = readFileSync(https[prop])\n            } catch (err) {\n              console.error(err)\n              console.log()\n              delete https[prop]\n              warn(\n                `The devServer.https.${prop} file could not be read. Removed the config.`\n              )\n            }\n          }\n        })\n      }\n    }\n\n    if (this.#ctx.mode.pwa) {\n      cfg.pwa = merge(\n        {\n          workboxMode: 'GenerateSW',\n          injectPWAMetaTags: true,\n          swFilename: 'sw.js', // should be .js (as it's the distribution file, not the input file)\n          manifestFilename: 'manifest.json',\n          useCredentialsForManifestTag: false\n        },\n        cfg.pwa\n      )\n\n      if (!['GenerateSW', 'InjectManifest'].includes(cfg.pwa.workboxMode)) {","sourceCodeStart":1443,"sourceCodeEnd":1479,"githubUrl":"https://github.com/quasarframework/quasar/blob/4841521b5f635a971eb9e2710e5542efd194691b/app-vite/lib/quasar-config-file.js#L1443-L1479","documentation":"Quasar's #computeConfig validates each devServer.https file option (key/cert/pfx for a custom HTTPS dev server). When fs read/parse of the configured file fails, it logs the error, deletes that option from the config and prints this warning so the dev server can continue (falling back to non-https or remaining https options) instead of crashing.","triggerScenarios":"quasar dev/build with quasar.config > devServer > https containing a key/cert/pfx path that does not exist, has wrong permissions, or contains invalid PEM content; computed during #computeConfig via quasarConf getter.","commonSituations":"Path relative to the wrong directory (must resolve from project root), .pem files gitignored on a fresh clone, CI secrets not written to disk, certificates rotated/deleted, or typos in filenames.","solutions":["Fix the path in quasar.config > devServer > https so the file exists relative to the project root and is readable.","Regenerate the certificate (e.g. mkcert) and point key/cert/pfx at the new files.","In CI, ensure secrets are materialized to the configured file paths before running quasar dev/build.","If HTTPS is not needed, remove the devServer.https block entirely."],"exampleFix":"// before (quasar.config)\ndevServer: { https: { key: 'certs/key.pem', cert: 'certs/cert.pem' } }\n// after: place files at <projectRoot>/certs/ or fix paths\ndevServer: { https: { key: './certs/localhost-key.pem', cert: './certs/localhost.pem' } }","handlingStrategy":"validation","validationCode":"import { existsSync, readFileSync } from 'node:fs'\nfor (const prop of ['key', 'cert', 'pfx']) {\n  const f = cfg.devServer?.https?.[prop]\n  if (f && !existsSync(f)) throw new Error(`devServer.https.${prop} not found: ${f}`)\n  if (f && !readFileSync(f, 'utf8').includes('PRIVATE KEY')) console.warn(`devServer.https.${prop} may not be a valid key/cert`)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep cert files in the repo root-relative path referenced by quasar.config and commit them or generate them via a setup script (mkcert).","Add a predev script that checks the https files exist before quasar dev.","Never rely on absolute paths from other machines."],"tags":["config","https","dev-server","certificate"],"backgroundTag":"https-cert-file-unreadable","analyzedSha":"4841521b5f635a971eb9e2710e5542efd194691b","analyzedAt":"2026-08-30T01:13:14.944Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}