{"record":{"id":"2282fd465c6d64db","repo":"quasarframework/quasar","slug":"the-quasar-config-file-has-runtime-errors-please","errorCode":null,"errorMessage":"The quasar.config file has runtime errors. Please check the Node.js stack above against the temporarily created ${basename(this.#tempFile)} file then DELETE it (\"quasar clean --qconf\" can be used). Please fix the errors in the original file.\n","messagePattern":"The quasar\\.config file has runtime errors\\. Please check the Node\\.js stack above against the temporarily created (.+?) file then DELETE it \\(\"quasar clean --qconf\" can be used\\)\\. Please fix the errors in the original file\\.\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"app-vite/lib/quasar-config-file.js","lineNumber":781,"sourceCode":"    }\n\n    let userCfg\n\n    try {\n      userCfg = await quasarConfigFn(this.#ctx)\n    } catch (err) {\n      console.log()\n      console.error(err)\n\n      const msg =\n        'The quasar.config file has runtime errors.' +\n        ' Please check the Node.js stack above against the' +\n        ` temporarily created ${basename(this.#tempFile)} file` +\n        ' then DELETE it (\"quasar clean --qconf\" can be used).'\n\n      if (this.#shouldFail) fatal(msg, 'FAIL')\n\n      warn(msg + ' Please fix the errors in the original file.\\n')\n      return\n    }\n\n    fse.removeSync(this.#tempFile)\n\n    if (Object(userCfg) !== userCfg) {\n      const msg = 'The quasar.config file does not default exports an Object.'\n\n      if (this.#shouldFail) fatal(msg, 'FAIL')\n\n      warn(msg + ' Please fix it.\\n')\n      return\n    }\n\n    const { appPaths } = this.#ctx\n\n    let rawQuasarConf = merge(\n      {","sourceCodeStart":763,"sourceCodeEnd":799,"githubUrl":"https://github.com/quasarframework/quasar/blob/4841521b5f635a971eb9e2710e5542efd194691b/app-vite/lib/quasar-config-file.js#L763-L799","documentation":"After quasar.config compiles, QuasarConfigFile executes the bundled output from a temporary file (#computeConfig) to produce the runtime configuration object. If evaluating that file throws, the config is invalid at runtime; the tool tells you the exact temp file (e.g. .quasar/quasar.config.tmp.js) to inspect against the Node.js stack, and instructs you to delete it (or run `quasar clean --qconf`) because it is a generated artifact.","triggerScenarios":"Code inside quasar.config that throws when evaluated: calling undefined functions, accessing files/env that don't exist, requiring a module that throws on import, or invalid return values from the configure callback — hit whenever the config is computed (quasarConf) during `quasar dev`/`quasar build`.","commonSituations":"`ctx.dev`/`ctx.prod` used where ctx is undefined due to a broken configure signature; requiring a JSON/env file with a wrong relative path (paths resolve from the temp file location, not the original); a plugin or custom extension throwing at import time; stale temp config left behind by a previous crashed run.","solutions":["Read the Node.js stack printed above the warning and compare it against the temporarily created file it names to locate the throwing line","Fix the error in your original quasar.config file (remember the temp bundle executes with different relative paths)","Delete the leftover temp file or run `quasar clean --qconf`","Re-run `quasar dev` / `quasar build` to confirm the config computes cleanly"],"exampleFix":"// before (quasar.config.js)\nconst secret = require('../../outside/secrets.json') // wrong relative path from temp file -> throws\n// after\nconst path = require('node:path')\nconst secret = require(path.resolve(__dirname, 'secrets.json'))","handlingStrategy":"validation","validationCode":"// smoke-run the config logic before invoking quasar\nclass Ctx {}\nconst cfg = require('./quasar.config.js')\ntry {\n  typeof cfg === 'function'\n    ? cfg(function () { return {} })\n    : cfg\n  console.log('quasar.config evaluates OK')\n} catch (err) {\n  console.error('quasar.config throws at evaluation time:', err)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use paths relative to __dirname (or path.resolve) for files required inside quasar.config — the temp bundle executes from another location","After any runtime config error, run `quasar clean --qconf` to remove the leftover temp file","Keep the configure callback signature correct: `configure(function (ctx) { ... })`","Avoid side effects (reading env files, network calls) that can throw during config evaluation; guard them with try/catch"],"tags":["quasar-config","runtime","node","config-evaluation"],"backgroundTag":"config-runtime-error","analyzedSha":"4841521b5f635a971eb9e2710e5542efd194691b","analyzedAt":"2026-08-30T01:13:14.944Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}