quasarframework/quasar · error

Could not read BEX manifest. Please check its syntax.

Error message

Could not read BEX manifest. Please check its syntax.

What it means

createManifest reads the raw source BEX manifest JSON (src-bex/manifest.json) and merges its all/target sections. If the file cannot be read or parsed as JSON, this warning is emitted and an { err } object is returned so the BEX build can stop early.

Source

Thrown at app-vite/lib/modes/bex/bex-utils.js:14

import fse from 'fs-extra'
import { join } from 'node:path'
import { merge } from 'webpack-merge'

import { warn } from '../../utils/logger.js'

export async function createManifest(quasarConf) {
  let json
  const bexManifestPath = quasarConf.metaConf.bexManifestFile

  try {
    json = JSON.parse(fse.readFileSync(bexManifestPath, 'utf8'))
  } catch (err) {
    warn('Could not read BEX manifest. Please check its syntax.')
    return { err }
  }

  json = merge({}, json.all || {}, json[quasarConf.ctx.targetName] || {})

  if (json.manifest_version === void 0) {
    warn(
      'The BEX manifest requires a "manifest_version" prop, which is currently missing.'
    )
    return { err: true }
  }

  const {
    appPkg: { productName, name, description, version }
  } = quasarConf.ctx.pkg

  if (json.name === void 0) {
    json.name = productName || name

View on GitHub (pinned to 4841521b5f)

Solutions

  1. Open the BEX manifest file (default src-bex/manifest.json) and fix the JSON syntax error (the companion `err` names the exact parse issue)
  2. Validate the file with a JSON linter or `node -e "JSON.parse(require('fs').readFileSync('src-bex/manifest.json','utf8'))"`
  3. Restore the default manifest from the Quasar BEX template if it was deleted
  4. Re-save the file as UTF-8 without BOM if your editor changed the encoding

Example fix

// before (src-bex/manifest.json)
{ "manifest_version": 3, "name": "app", }
// after
{
  "manifest_version": 3,
  "name": "app"
}
Defensive patterns

Strategy: validation

Validate before calling

const fs = require('fs')
try {
  JSON.parse(fs.readFileSync('src-bex/manifest.json', 'utf8'))
  console.log('BEX manifest is valid JSON')
} catch (err) {
  console.error('Fix manifest before building:', err.message)
}

Try / catch

try {
  JSON.parse(fs.readFileSync(manifestPath, 'utf8'))
} catch (err) {
  console.error('Manifest unreadable at ' + manifestPath + ':', err.message)
}

Prevention

When it happens

Trigger: fse.readFileSync or JSON.parse throws on the manifest file at quasarConf.metaConf.bexManifestFile: file missing, empty, invalid JSON syntax, or wrong encoding/BOM.

Common situations: Missing src-bex/manifest.json in a fresh BEX project; trailing comma or comment left in the JSON; file saved as UTF-16 by an editor; manifest accidentally deleted or renamed.

Related errors


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