{"record":{"id":"0f56a9f0f0ac5680","repo":"parcel-bundler/parcel","slug":"unable-to-name-bundle","errorCode":null,"errorMessage":"Unable to name bundle","messagePattern":"Unable to name bundle","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/core/src/requests/BundleGraphRequest.js","lineNumber":542,"sourceCode":"          let {hashReference} = internalBundle;\n          internalBundle.displayName = name.includes(hashReference)\n            ? name.replace(hashReference, '[hash]')\n            : name;\n\n          return;\n        }\n      } catch (e) {\n        throw new ThrowableDiagnostic({\n          diagnostic: errorToDiagnostic(e, {\n            origin: namer.name,\n          }),\n        });\n      } finally {\n        measurement && measurement.end();\n      }\n    }\n\n    throw new Error('Unable to name bundle');\n  }\n}\n","sourceCodeStart":524,"sourceCodeEnd":545,"githubUrl":"https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/requests/BundleGraphRequest.js#L524-L545","documentation":"Thrown by nameBundle() after iterating through every configured namer plugin and none returned a non-null name for the bundle. Each namer's plugin.name() is called in order; if all return undefined/null, the loop exhausts and the bare Error is thrown. This indicates a missing or misconfigured namer plugin in the Parcel config.","triggerScenarios":"Reached at the end of the for (let namer of namers) loop in nameBundle(). Every namer.plugin.name({...}) call returned null/undefined, so internalBundle.name was never set. The namers array comes from the Parcel config's namers pipeline.","commonSituations":"Using a custom .parcelrc that omits the default namer (@parcel/namer-default); a namer plugin that has a bug causing it to always return null; targeting an environment the default namer doesn't handle; upgrading Parcel and the default config changed so no namer is loaded.","solutions":["Ensure your .parcelrc includes a namer — the default config provides @parcel/namer-default; if you have a custom .parcelrc, add it to the namers array.","If extending the default config, verify your extends field is correct and not accidentally replacing the namers section.","Check that @parcel/namer-default is installed: npm ls @parcel/namer-default.","If writing a custom namer plugin, ensure it returns a string name for at least the bundle types in your project.","Remove .parcelrc temporarily to let Parcel use its built-in default config and confirm the error disappears."],"exampleFix":"// before — .parcelrc with no namers\n{\n  \"extends\": \"@parcel/config-default\",\n  \"namers\": []\n}\n\n// after — remove the override or include the default namer\n{\n  \"extends\": \"@parcel/config-default\"\n}","handlingStrategy":"validation","validationCode":"const fs = require('fs');\nfunction validateNamerConfig(parcelrcPath) {\n  const cfg = JSON.parse(fs.readFileSync(parcelrcPath, 'utf8'));\n  if (cfg.namers !== undefined && (!Array.isArray(cfg.namers) || cfg.namers.length === 0)) {\n    throw new Error('.parcelrc has an empty or invalid namers array — at least one namer is required.');\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always extend @parcel/config-default unless you have a specific reason not to.","If customizing namers, include @parcel/namer-default as the last entry.","Verify @parcel/namer-default is installed when using a custom .parcelrc."],"tags":["namer","bundle","plugin-config","parcelrc"],"backgroundTag":null,"analyzedSha":"59484858a1a0bcbb71f74088956bb437a2db6505","analyzedAt":"2026-08-13T04:06:35.925Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}