quasarframework/quasar · critical

Importing quasar.config file results in error. Please check

Error message

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).

What it means

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.

Source

Thrown at app-vite/lib/quasar-config-file.js:509

      console.error(err)

      if (!this.#opts.watch) {
        fatal(
          'The quasar.config file has runtime errors. Please check the Node.js stack above against the' +
            ` temporarily created ${basename(this.#tempFile)} file, fix the original file` +
            ' then DELETE the temporary one ("quasar clean --qconf" can be used).',
          'FAIL'
        )
      }

      const msg =
        '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).'

      if (this.#shouldFail) fatal(msg, 'FAIL')

      warn(msg + '\n')
      return
    }

    const quasarConf = await this.#computeConfig(quasarConfigFn)

    if (this.#opts.watch && quasarConf !== void 0) {
      this.#watch.cachedQuasarConf = quasarConf
    }

    return quasarConf
  }

  #getConfEnv() {
    const { quasarCli } = JSON.parse(
      fse.readFileSync(this.#hostPackageJsonPath, 'utf8')
    )

    return getQuasarConfEnv({

View on GitHub (pinned to 4841521b5f)

Solutions

  1. 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.
  2. Delete the leftover temporary quasar.config file (run `quasar clean --qconf` or remove quasar.config.*~ manually).
  3. Check that every package imported by quasar.config is installed and its import path is valid.
  4. Validate the file standalone: `node quasar.config.js` (or your equivalent) should not throw on import.
  5. Restart the dev server / re-run the command after fixing.

Example fix

// before (quasar.config)
import { missingPkg } from 'not-installed'
export default configure(function () { ... })
// after
export default configure(function (ctx) {
  return { /* valid config */ }
})
Defensive patterns

Strategy: try-catch

Validate before calling

// Pre-validate the config imports cleanly:
import('./quasar.config.js').catch(err => {
  console.error('quasar.config import fails:', err)
  process.exit(1)
})

Try / catch

try {
  const cfg = (await import('./quasar.config.js')).default
} catch (err) {
  console.error('Fix quasar.config; remove leftover temp file via `quasar clean --qconf`', err)
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of quasarframework/quasar@4841521b5f (2026-08-30). Data as JSON: /api/errors/ddcd616deafc576f. Report an issue: GitHub.