{"record":{"id":"ddcd616deafc576f","repo":"quasarframework/quasar","slug":"importing-quasar-config-file-results-in-error-ple","errorCode":null,"errorMessage":"Importing quasar.config file results in error. Please check the Node.js stack above against the temporarily created ${basename(this.#tempFile)} file and fix the original file then DELETE the temporary one (\"quasar clean --qconf\" can be used).","messagePattern":"Importing quasar\\.config file results in error\\. Please check the Node\\.js stack above against the temporarily created (.+?) file and fix the original file then DELETE the temporary one \\(\"quasar clean --qconf\" can be used\\)\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"app-vite/lib/quasar-config-file.js","lineNumber":509,"sourceCode":"      console.error(err)\n\n      if (!this.#opts.watch) {\n        fatal(\n          'The quasar.config file has runtime errors. Please check the Node.js stack above against the' +\n            ` temporarily created ${basename(this.#tempFile)} file, fix the original file` +\n            ' then DELETE the temporary one (\"quasar clean --qconf\" can be used).',\n          'FAIL'\n        )\n      }\n\n      const msg =\n        'Importing quasar.config file results in error. Please check the' +\n        ` Node.js stack above against the temporarily created ${basename(this.#tempFile)} file` +\n        ' and fix the original file then DELETE the temporary one (\"quasar clean --qconf\" can be used).'\n\n      if (this.#shouldFail) fatal(msg, 'FAIL')\n\n      warn(msg + '\\n')\n      return\n    }\n\n    const quasarConf = await this.#computeConfig(quasarConfigFn)\n\n    if (this.#opts.watch && quasarConf !== void 0) {\n      this.#watch.cachedQuasarConf = quasarConf\n    }\n\n    return quasarConf\n  }\n\n  #getConfEnv() {\n    const { quasarCli } = JSON.parse(\n      fse.readFileSync(this.#hostPackageJsonPath, 'utf8')\n    )\n\n    return getQuasarConfEnv({","sourceCodeStart":491,"sourceCodeEnd":527,"githubUrl":"https://github.com/quasarframework/quasar/blob/4841521b5f635a971eb9e2710e5542efd194691b/app-vite/lib/quasar-config-file.js#L491-L527","documentation":"Quasar copies quasar.config to a temporary file and imports it; when that import throws, #readBuiltFile reports this message asking you to check the Node.js stack trace above against the temp file, fix the original config, then delete the temporary one. When shouldFail (e.g. build/dev startup) it is fatal; in watch mode it warns and keeps running.","triggerScenarios":"quasar.config (or its transitive imports) throwing at module-evaluation time: syntax error, bad import of a missing package, throwing top-level code, wrong ESM/CJS format, or reference to an undefined env var. Raised from #readBuiltFile, reached via watch, read, and #watchBuild.","commonSituations":"Hand-editing quasar.config and introducing a syntax error; importing a package that isn't installed; top-level await/throw; mixing ESM export in a file loaded as CJS; leftover quasar.config.<...> temp file from a previous crash confusing tooling.","solutions":["Read the Node.js stack trace printed above the message — it points to the exact line in the temp copy; map it to your original quasar.config and fix it.","Delete the leftover temporary quasar.config file (run `quasar clean --qconf` or remove quasar.config.*~ manually).","Check that every package imported by quasar.config is installed and its import path is valid.","Validate the file standalone: `node quasar.config.js` (or your equivalent) should not throw on import.","Restart the dev server / re-run the command after fixing."],"exampleFix":"// before (quasar.config)\nimport { missingPkg } from 'not-installed'\nexport default configure(function () { ... })\n// after\nexport default configure(function (ctx) {\n  return { /* valid config */ }\n})","handlingStrategy":"try-catch","validationCode":"// Pre-validate the config imports cleanly:\nimport('./quasar.config.js').catch(err => {\n  console.error('quasar.config import fails:', err)\n  process.exit(1)\n})","typeGuard":null,"tryCatchPattern":"try {\n  const cfg = (await import('./quasar.config.js')).default\n} catch (err) {\n  console.error('Fix quasar.config; remove leftover temp file via `quasar clean --qconf`', err)\n}","preventionTips":["Run `quasar clean --qconf` after config-editing crashes to remove temp files.","Syntax-check quasar.config with your editor/linter before running commands.","Avoid heavy top-level logic in quasar.config; keep it declarative.","Only import installed packages in quasar.config."],"tags":["config","module-import","syntax-error","node"],"backgroundTag":"config-file-import-error","analyzedSha":"4841521b5f635a971eb9e2710e5542efd194691b","analyzedAt":"2026-08-30T01:13:14.944Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}