quasarframework/quasar · warning
The devServer.https.${prop} file could not be read. Removed
Error message
The devServer.https.${prop} file could not be read. Removed the config. What it means
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.
Source
Thrown at app-vite/lib/quasar-config-file.js:1461
}
} else if (Object(cfg.devServer.https) === cfg.devServer.https) {
const { https } = cfg.devServer
// we now check if config is specifying a file path
// and we actually read the contents so we can later supply correct
// params to the node HTTPS server
;['ca', 'pfx', 'key', 'cert'].forEach(prop => {
if (typeof https[prop] === 'string') {
try {
https[prop] = readFileSync(https[prop])
} catch (err) {
console.error(err)
console.log()
delete https[prop]
warn(
`The devServer.https.${prop} file could not be read. Removed the config.`
)
}
}
})
}
}
if (this.#ctx.mode.pwa) {
cfg.pwa = merge(
{
workboxMode: 'GenerateSW',
injectPWAMetaTags: true,
swFilename: 'sw.js', // should be .js (as it's the distribution file, not the input file)
manifestFilename: 'manifest.json',
useCredentialsForManifestTag: false
},
cfg.pwa
)
if (!['GenerateSW', 'InjectManifest'].includes(cfg.pwa.workboxMode)) {View on GitHub (pinned to 4841521b5f)
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.
Example fix
// before (quasar.config)
devServer: { https: { key: 'certs/key.pem', cert: 'certs/cert.pem' } }
// after: place files at <projectRoot>/certs/ or fix paths
devServer: { https: { key: './certs/localhost-key.pem', cert: './certs/localhost.pem' } } Defensive patterns
Strategy: validation
Validate before calling
import { existsSync, readFileSync } from 'node:fs'
for (const prop of ['key', 'cert', 'pfx']) {
const f = cfg.devServer?.https?.[prop]
if (f && !existsSync(f)) throw new Error(`devServer.https.${prop} not found: ${f}`)
if (f && !readFileSync(f, 'utf8').includes('PRIVATE KEY')) console.warn(`devServer.https.${prop} may not be a valid key/cert`)
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- ERROR_NETWORK_PORT_NOT_AVAIL
- Build output directory must be a non-empty path
- Project directory must be a non-empty path
- Refusing to remove the project root as build output
- Build output directory must remain inside the project. Set b
AI-assisted analysis of quasarframework/quasar@4841521b5f (2026-08-30).
Data as JSON: /api/errors/d7eb4c29b21dc1d1.
Report an issue: GitHub.