Skip to content

[BUG] version specifier doesn't work with scoped packages in npm init #5175

Description

@alan-agius4

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

When using npm init the version specifier doesn't work when the package is scoped.

Expected Behavior

The version specifier is used and the command doesn't error.

Steps To Reproduce

$ npm create @angular@next
npm ERR! code EINVALIDPACKAGENAME
npm ERR! Invalid package name "@angular" of package "@angular@next/create": name can only contain URL-friendly characters.

Environment

  • npm: 8.11.0
  • Node.js: 16.15.1
  • OS Name: Linux 5.17 Debian GNU/Linux rodete 12 (rodete)
  • System Model Name: cloud

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingPriority 1high priority issueRelease 8.xwork is associated with a specific npm 8 release

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions