quasarframework/quasar · critical

The default export value of the quasar.config file is not a

Error message

The default export value of the quasar.config file is not a function. Please fix it.

What it means

#computeConfig validates that quasar.config's default export is a function (Quasar's configure() wrapper); if not, it reports this message. When shouldFail it is fatal; otherwise it warns and skips config computation, so the command cannot proceed with a valid config.

Source

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

        'FAIL'
      )
    }

    await bundle.close()
  }

  // exits process on first build, otherwise
  // returns undefined if it encounters errors
  async #computeConfig(quasarConfigFn) {
    if (typeof quasarConfigFn !== 'function') {
      fse.removeSync(this.#tempFile)

      const msg =
        'The default export value of the quasar.config file is not a function.'

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

      warn(msg + ' Please fix it.\n')
      return
    }

    let userCfg

    try {
      userCfg = await quasarConfigFn(this.#ctx)
    } catch (err) {
      console.log()
      console.error(err)

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

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

View on GitHub (pinned to 4841521b5f)

Solutions

  1. Wrap the returned object in configure(): `export default configure(function (ctx) { return { ... } })`.
  2. Ensure the function returns the config object (not nothing).
  3. If converting from quasar.conf.js, follow the official migration to the quasar.config file format.
  4. Check the default export exists at all (only `export default` counts).

Example fix

// before
export default {
  framework: { plugins: ['Notify'] }
}
// after
import { configure } from 'quasar/wrappers'
export default configure(function (ctx) {
  return { framework: { plugins: ['Notify'] } }
})
Defensive patterns

Strategy: type-guard

Validate before calling

// After loading the module:
const mod = await import('./quasar.config.js')
if (typeof mod.default !== 'function') {
  throw new Error('quasar.config default export must be a function')
}

Type guard

function isConfigureExport(v) {
  return typeof v === 'function'
}

Prevention

When it happens

Trigger: quasar.config file's default export is not a function — e.g. `export default { ... }` (object) instead of `export default configure(() => ({...}))`, or a plain `module.exports = {...}` in CJS without a function default.

Common situations: Migrating a project from an older config format (quasar.conf.js exporting an object) to quasar.config file without wrapping in configure(); hand-written config copied from non-Quasar docs; AI/manual edit rewriting the export incorrectly.

Related errors


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