parcel-bundler/parcel · error · ThrowableDiagnostic

Named pipeline '${k.slice(0, i + 1)}' is reserved.

Error message

Named pipeline '${k.slice(0, i + 1)}' is reserved.

What it means

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.

Source

Thrown at packages/core/core/src/requests/ParcelConfigRequest.js:297

]);

async function processMap(
  // $FlowFixMe
  map: ?ConfigMap<any, any>,
  keyPath: string,
  filePath: FilePath,
  options: ParcelOptions,
  // $FlowFixMe
): Promise<ConfigMap<any, any> | typeof undefined> {
  if (!map) return undefined;

  // $FlowFixMe
  let res: ConfigMap<any, any> = {};
  for (let k in map) {
    let i = k.indexOf(':');
    if (i > 0 && RESERVED_PIPELINES.has(k.slice(0, i + 1))) {
      let code = await options.inputFS.readFile(filePath, 'utf8');
      throw new ThrowableDiagnostic({
        diagnostic: {
          message: `Named pipeline '${k.slice(0, i + 1)}' is reserved.`,
          origin: '@parcel/core',
          codeFrames: [
            {
              filePath: filePath,
              language: 'json5',
              code,
              codeHighlights: generateJSONCodeHighlights(code, [
                {
                  key: `${keyPath}/${k}`,
                  type: 'key',
                },
              ]),
            },
          ],
          documentationURL:
            'https://parceljs.org/features/dependency-resolution/#url-schemes',

View on GitHub (pinned to 59484858a1)

Solutions

  1. Rename the pipeline key to something that doesn't collide with a reserved scheme — use a plain alphanumeric name without a reserved prefix.
  2. If you need protocol-specific behavior, use the URL scheme in import specifiers (e.g., import 'npm:react') rather than as a pipeline name.
  3. Read the linked documentation: https://parceljs.org/features/dependency-resolution/#url-schemes.

Example fix

// before — .parcelrc
{
  "extends": "@parcel/config-default",
  "transformers": {
    "http:*": ["my-http-transformer"]
  }
}

// after — use a non-reserved name
{
  "extends": "@parcel/config-default",
  "transformers": {
    "web-resource:*": ["my-http-transformer"]
  }
}
Defensive patterns

Strategy: validation

Validate before calling

const RESERVED = new Set(['node:', 'npm:', 'http:', 'https:', 'data:', 'tel:', 'mailto:']);
function validateNoReservedPipelineKeys(parcelrc) {
  for (const section of ['transformers', 'bundlers', 'namers', 'runners']) {
    const map = parcelrc[section];
    if (!map) continue;
    for (const key of Object.keys(map)) {
      const i = key.indexOf(':');
      if (i > 0 && RESERVED.has(key.slice(0, i + 1))) {
        throw new Error(`Pipeline key "${key}" uses reserved scheme "${key.slice(0, i + 1)}".`);
      }
    }
  }
}

Prevention

When it happens

Trigger: 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".

Common situations: 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.

Related errors


AI-assisted analysis of parcel-bundler/parcel@59484858a1 (2026-08-13). Data as JSON: /api/errors/f1aa87dc980c11f7. Report an issue: GitHub.