{"record":{"id":"d08113df8720c335","repo":"quasarframework/quasar","slug":"the-file-defined-in-bex-manifest-background-sc","errorCode":null,"errorMessage":"The file defined in bex manifest > background > scripts > \"${rawName}\" does NOT exist. Skipping.","messagePattern":"The file defined in bex manifest > background > scripts > \"(.+?)\" does NOT exist\\. Skipping\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"app-vite/lib/modes/bex/bex-utils.js","lineNumber":138,"sourceCode":"      warn()\n    } else {\n      const entry = getCompilationEntry(quasarConf, inputFile, scriptName)\n      if (!scriptNameSet.has(entry.name)) {\n        scriptNameSet.add(entry.name)\n        scriptList.push(entry)\n      }\n    }\n  }\n\n  bexManifest.background?.scripts?.forEach((rawName, index) => {\n    const scriptName = rawName.replace(scriptExtRE, '')\n    const inputFile = quasarConf.ctx.appPaths.resolve.bex(rawName)\n\n    bexManifest.background.scripts[index] = scriptName + '.js'\n\n    if (!fse.existsSync(inputFile)) {\n      warn()\n      warn(\n        `The file defined in bex manifest > background > scripts > \"${rawName}\" does NOT exist. Skipping.`\n      )\n      warn()\n      return\n    }\n\n    const entry = getCompilationEntry(quasarConf, inputFile, scriptName)\n    if (!scriptNameSet.has(entry.name)) {\n      scriptNameSet.add(entry.name)\n      scriptList.push(entry)\n    }\n  })\n\n  bexManifest.content_scripts?.forEach(contentScript => {\n    contentScript.js?.forEach((rawName, index) => {\n      const scriptName = rawName.replace(scriptExtRE, '')\n      const inputFile = quasarConf.ctx.appPaths.resolve.bex(rawName)\n","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/quasarframework/quasar/blob/4841521b5f635a971eb9e2710e5542efd194691b/app-vite/lib/modes/bex/bex-utils.js#L120-L156","documentation":"extractBexScripts iterates manifest background.scripts (MV2 style) and maps each entry to a compiled script. If the raw file cannot be found under src-bex, it warns and returns, skipping that script from the background bundle.","triggerScenarios":"An entry of background.scripts in src-bex/manifest.json points to a non-existent file; fse.existsSync(inputFile) is false for quasarConf.ctx.appPaths.resolve.bex(rawName).","commonSituations":"Legacy MV2 manifests listing several background scripts where some were removed; copy-pasted manifest from another extension referencing its own files; moved scripts into subfolders without updating paths.","solutions":["Fix the path of the missing script in manifest background.scripts[index].","Add the missing file under src-bex.","Remove the stale entry from background.scripts if the script is no longer used.","Consider migrating to MV3 service_worker background if appropriate."],"exampleFix":"// before\n\"background\": { \"scripts\": [\"helpers.js\", \"old-util.js\"] } // old-util.js deleted\n// after\n\"background\": { \"scripts\": [\"helpers.js\"] }","handlingStrategy":"validation","validationCode":"const fs = require('fs'), path = require('path')\nfor (const s of require('./src-bex/manifest.json').all?.background?.scripts || []) {\n  if (!fs.existsSync(path.join('src-bex', s))) throw new Error(`background script missing: src-bex/${s}`)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Prune removed scripts from background.scripts immediately.","Add a manifest-vs-files consistency test to CI.","Prefer a single bundled background entry over multiple raw scripts."],"tags":["bex","manifest","missing-file","background-scripts"],"backgroundTag":"referenced-file-not-found","analyzedSha":"4841521b5f635a971eb9e2710e5542efd194691b","analyzedAt":"2026-08-30T01:13:14.944Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}