{"record":{"id":"5497122400678963","repo":"quasarframework/quasar","slug":"the-quasar-config-file-does-not-default-exports-an","errorCode":null,"errorMessage":"The quasar.config file does not default exports an Object. Please fix it.","messagePattern":"The quasar\\.config file does not default exports an Object\\. Please fix it\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"app-vite/lib/quasar-config-file.js","lineNumber":792,"sourceCode":"        '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      {\n        ctx: this.#ctx,\n\n        boot: [],\n        css: [],\n        extras: [],\n        animations: [],\n\n        framework: {\n          components: [],\n          directives: [],\n          plugins: [],","sourceCodeStart":774,"sourceCodeEnd":810,"githubUrl":"https://github.com/quasarframework/quasar/blob/4841521b5f635a971eb9e2710e5542efd194691b/app-vite/lib/quasar-config-file.js#L774-L810","documentation":"#computeConfig calls the default-exported function and requires it to return an Object (`Object(userCfg) === userCfg`); if the result is a primitive, null or undefined, Quasar reports this message. Fatal when shouldFail, otherwise a warning that aborts config computation.","triggerScenarios":"The quasar.config default-export function returns a non-object: returns nothing, returns a string/number/boolean, returns a promise without await, or `configure()` was bypassed with a function returning null.","commonSituations":"Forgot the `return` statement inside configure(function (ctx) { ... }); conditional branches where every path doesn't return an object; copying a snippet whose arrow function body is `=> { ... }` without return.","solutions":["Make the exported function return a config object on every code path.","Verify braces/arrow syntax: `configure(ctx => ({ ... }))` vs `configure(ctx => { return { ... } })`.","Remove accidental `return;` or null returns in conditional branches.","Log the function result in isolation (`node -e`) to confirm it's an object."],"exampleFix":"// before\nexport default configure(function (ctx) {\n  build: { vitePlugins: [] } // no return; object literal not returned\n})\n// after\nexport default configure(function (ctx) {\n  return { build: { vitePlugins: [] } }\n})","handlingStrategy":"type-guard","validationCode":"const mod = await import('./quasar.config.js')\nconst cfg = mod.default({ dev: true })\nif (Object(cfg) !== cfg) {\n  throw new Error('quasar.config function must return an object')\n}","typeGuard":"function returnsObject(fn) {\n  return Object(fn({ dev: true })) === fn({ dev: true })\n}","tryCatchPattern":null,"preventionTips":["Ensure every branch of the configure function returns a config object.","Prefer the single-expression arrow form: configure(ctx => ({ ... })).","Add a temporary console.log of the returned value when refactoring config.","Keep conditional config generation small and reviewed."],"tags":["config","return-type","shape-mismatch"],"backgroundTag":"invalid-config-export","analyzedSha":"4841521b5f635a971eb9e2710e5542efd194691b","analyzedAt":"2026-08-30T01:13:14.944Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}