-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
Bugthing that needs fixingthing that needs fixingPriority 1high priority issuehigh priority issueRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release
Milestone
Description
Current Behavior:
npm init <pkg> always runs whatever version of the <pkg> is installed and doesn't check whether
there's a later version. Moreover, there is no way to tell it to do that.
Expected Behavior:
npm init <pkg> should first check if there's an updated version of <pkg> and install that before running it.
Alternatively, there should be an option (--update?) that updates to the latest version before running it.
Steps To Reproduce:
- Publish
@scope/create(v1.0.0) - Run
npm init @scope. It runs v1.0.0 as expected (which is OK). - Publish a new
@scope/create(v1.1.0) - Run
npm init @scope. It still runs v1.0.0 and there is no way to make it run v1.1.0. - The workaround I have is to
npm exec @scope/create@latest, which does the right thing. - Even doing
npm install -g @scope/create@latestdoesn't help
Environment:
I'm guessing all versions, but specifically what I'm running on is:
OS: MacOS Big Sur
Node.js: 15.3.0.
NPM: 7.0.14
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingPriority 1high priority issuehigh priority issueRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release