{"record":{"id":"f1aa87dc980c11f7","repo":"parcel-bundler/parcel","slug":"named-pipeline-k-slice-0-i-1-is-reserved","errorCode":null,"errorMessage":"Named pipeline '${k.slice(0, i + 1)}' is reserved.","messagePattern":"Named pipeline '(.+?)' is reserved\\.","errorType":"exception","errorClass":"ThrowableDiagnostic","httpStatus":null,"severity":"error","filePath":"packages/core/core/src/requests/ParcelConfigRequest.js","lineNumber":297,"sourceCode":"]);\n\nasync function processMap(\n  // $FlowFixMe\n  map: ?ConfigMap<any, any>,\n  keyPath: string,\n  filePath: FilePath,\n  options: ParcelOptions,\n  // $FlowFixMe\n): Promise<ConfigMap<any, any> | typeof undefined> {\n  if (!map) return undefined;\n\n  // $FlowFixMe\n  let res: ConfigMap<any, any> = {};\n  for (let k in map) {\n    let i = k.indexOf(':');\n    if (i > 0 && RESERVED_PIPELINES.has(k.slice(0, i + 1))) {\n      let code = await options.inputFS.readFile(filePath, 'utf8');\n      throw new ThrowableDiagnostic({\n        diagnostic: {\n          message: `Named pipeline '${k.slice(0, i + 1)}' is reserved.`,\n          origin: '@parcel/core',\n          codeFrames: [\n            {\n              filePath: filePath,\n              language: 'json5',\n              code,\n              codeHighlights: generateJSONCodeHighlights(code, [\n                {\n                  key: `${keyPath}/${k}`,\n                  type: 'key',\n                },\n              ]),\n            },\n          ],\n          documentationURL:\n            'https://parceljs.org/features/dependency-resolution/#url-schemes',","sourceCodeStart":279,"sourceCodeEnd":315,"githubUrl":"https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/requests/ParcelConfigRequest.js#L279-L315","documentation":"Thrown by processMap() when a key in a config map (e.g., transformers, bundlers) uses a reserved URL scheme prefix. The reserved set is node:, npm:, http:, https:, data:, tel:, mailto:. These schemes have special meaning in Parcel's dependency resolution and cannot be used as named pipeline identifiers. The diagnostic links to the URL schemes documentation.","triggerScenarios":"Iterating keys in a config map within .parcelrc. For each key k, if it contains ':' and the prefix (including the colon) is in RESERVED_PIPELINES, the error fires. E.g., a transformers entry keyed \"npm:foo\" or \"http:bar\".","commonSituations":"Trying to create a named pipeline for a specific protocol like \"http:\" or \"npm:\"; misunderstanding that these prefixes are Parcel's built-in URL schemes for resolution; copy-pasting a config that used a scheme-like name.","solutions":["Rename the pipeline key to something that doesn't collide with a reserved scheme — use a plain alphanumeric name without a reserved prefix.","If you need protocol-specific behavior, use the URL scheme in import specifiers (e.g., import 'npm:react') rather than as a pipeline name.","Read the linked documentation: https://parceljs.org/features/dependency-resolution/#url-schemes."],"exampleFix":"// before — .parcelrc\n{\n  \"extends\": \"@parcel/config-default\",\n  \"transformers\": {\n    \"http:*\": [\"my-http-transformer\"]\n  }\n}\n\n// after — use a non-reserved name\n{\n  \"extends\": \"@parcel/config-default\",\n  \"transformers\": {\n    \"web-resource:*\": [\"my-http-transformer\"]\n  }\n}","handlingStrategy":"validation","validationCode":"const RESERVED = new Set(['node:', 'npm:', 'http:', 'https:', 'data:', 'tel:', 'mailto:']);\nfunction validateNoReservedPipelineKeys(parcelrc) {\n  for (const section of ['transformers', 'bundlers', 'namers', 'runners']) {\n    const map = parcelrc[section];\n    if (!map) continue;\n    for (const key of Object.keys(map)) {\n      const i = key.indexOf(':');\n      if (i > 0 && RESERVED.has(key.slice(0, i + 1))) {\n        throw new Error(`Pipeline key \"${key}\" uses reserved scheme \"${key.slice(0, i + 1)}\".`);\n      }\n    }\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Familiarize yourself with Parcel's reserved URL schemes before writing custom pipeline keys.","Use descriptive alphanumeric names for named pipelines.","Review the URL schemes documentation: https://parceljs.org/features/dependency-resolution/#url-schemes."],"tags":["parcelrc","config","reserved","url-schemes","pipeline"],"backgroundTag":null,"analyzedSha":"59484858a1a0bcbb71f74088956bb437a2db6505","analyzedAt":"2026-08-13T04:06:35.925Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}