{"id":"5ab229b3b6e437d8","repo":"evanw/esbuild","slug":"invalid-banner-file-type-type","errorCode":null,"errorMessage":"Invalid banner file type: ${type}","messagePattern":"Invalid banner file type: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"lib/shared/common.ts","lineNumber":320,"sourceCode":"  if (tsconfig) flags.push(`--tsconfig=${tsconfig}`)\n  if (packages) flags.push(`--packages=${packages}`)\n  if (resolveExtensions) flags.push(`--resolve-extensions=${validateAndJoinStringArray(resolveExtensions, 'resolve extension')}`)\n  if (publicPath) flags.push(`--public-path=${publicPath}`)\n  if (entryNames) flags.push(`--entry-names=${entryNames}`)\n  if (chunkNames) flags.push(`--chunk-names=${chunkNames}`)\n  if (assetNames) flags.push(`--asset-names=${assetNames}`)\n  if (mainFields) flags.push(`--main-fields=${validateAndJoinStringArray(mainFields, 'main field')}`)\n  if (conditions) flags.push(`--conditions=${validateAndJoinStringArray(conditions, 'condition')}`)\n  if (external) for (let name of external) flags.push(`--external:${validateStringValue(name, 'external')}`)\n  if (alias) {\n    for (let old in alias) {\n      if (old.indexOf('=') >= 0) throw new Error(`Invalid package name in alias: ${old}`)\n      flags.push(`--alias:${old}=${validateStringValue(alias[old], 'alias', old)}`)\n    }\n  }\n  if (banner) {\n    for (let type in banner) {\n      if (type.indexOf('=') >= 0) throw new Error(`Invalid banner file type: ${type}`)\n      flags.push(`--banner:${type}=${validateStringValue(banner[type], 'banner', type)}`)\n    }\n  }\n  if (footer) {\n    for (let type in footer) {\n      if (type.indexOf('=') >= 0) throw new Error(`Invalid footer file type: ${type}`)\n      flags.push(`--footer:${type}=${validateStringValue(footer[type], 'footer', type)}`)\n    }\n  }\n  if (inject) for (let path of inject) flags.push(`--inject:${validateStringValue(path, 'inject')}`)\n  if (loader) {\n    for (let ext in loader) {\n      if (ext.indexOf('=') >= 0) throw new Error(`Invalid loader extension: ${ext}`)\n      flags.push(`--loader:${ext}=${validateStringValue(loader[ext], 'loader', ext)}`)\n    }\n  }\n  if (outExtension) {\n    for (let ext in outExtension) {","sourceCodeStart":302,"sourceCodeEnd":338,"githubUrl":"https://github.com/evanw/esbuild/blob/6ff1d8b0d8c134e867a397eef39702a223ebef9e/lib/shared/common.ts#L302-L338","documentation":"Error \"Invalid banner file type: ${type}\" thrown in evanw/esbuild.","triggerScenarios":"Thrown at lib/shared/common.ts:320 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use only \"js\" or \"css\" as banner file types","Remove banner entries whose keys are not \"js\" or \"css\""],"exampleFix":"esbuild.buildSync({ banner: { js: '/* license */', css: '/* license */' } });","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"6ff1d8b0d8c134e867a397eef39702a223ebef9e","analyzedAt":"2026-08-03T19:42:38.433Z","schemaVersion":2}