yarnpkg/yarn · error · MessageError

manifestNameIllegalChars

Error message

manifestNameIllegalChars

What it means

Error "manifestNameIllegalChars" thrown in yarnpkg/yarn.

Source

Thrown at src/util/normalize-manifest/validate.js:67

      }
    }
  }

  // validate name
  const {name} = info;
  if (typeof name === 'string') {
    if (isRoot && isBuiltinModule(name)) {
      warn(reporter.lang('manifestBuiltinModule', name));
    }

    // cannot start with a dot
    if (name[0] === '.') {
      throw new MessageError(reporter.lang('manifestNameDot'));
    }

    // cannot contain the following characters
    if (!isValidPackageName(name)) {
      throw new MessageError(reporter.lang('manifestNameIllegalChars'));
    }

    // cannot equal node_modules or favicon.ico
    const lower = name.toLowerCase();
    if (lower === 'node_modules' || lower === 'favicon.ico') {
      throw new MessageError(reporter.lang('manifestNameBlacklisted'));
    }
  }

  // validate license
  if (isRoot && !info.private) {
    if (typeof info.license === 'string') {
      const license = info.license.replace(/\*$/g, '');
      if (!isValidLicense(license)) {
        warn(reporter.lang('manifestLicenseInvalid'));
      }
    } else {
      warn(reporter.lang('manifestLicenseNone'));

View on GitHub (pinned to c2dda503f3)

Solutions

  1. Remove the illegal characters from the package name. npm names may only contain lowercase letters, numbers, hyphens, underscores, and dots (no leading dot), plus an optional @scope/ prefix. Edit the name field in package.json.

Example fix

"name": "My Package!" -> "my-package"

When it happens

Trigger: A manifest name contains illegal URL or filesystem characters during normalization validation in src/util/normalize-manifest/validate.js.

Common situations: Occurs when package.json 'name' contains characters such as spaces, uppercase in some registries, or symbols disallowed by npm naming rules.


AI-assisted analysis of yarnpkg/yarn@c2dda503f3 (2026-08-13). Data as JSON: /api/errors/0f1cca5e962e1590. Report an issue: GitHub.