-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed as not planned
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next stepsRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
npm x -q --yes --package=<package>@<version> -- <command>
doesn't honor <version>
, uses incompatible package that is locally available instead.
Expected Behavior
npm x -q --yes --package=<package>@<version> -- <command>
honors <version>
, does not uses incompatible package that is locally available instead.
Steps To Reproduce
- Write this
package.json
:{ "private": true, "devDependencies": { "pnpm": "=6.12.1" } }
- Run
npm i
[email protected]
is now installed locally.$ npm x -q --yes -- pnpm --version 6.12.1
- Run pnpm 6.13.0 now:
npm x
won't honor the version$ npm x -q --yes --package="[email protected]" -- pnpm --version 6.12.1
The docs for npm exec
state:
Package names provided without a specifier will be matched with whatever version exists in the local project. Package names with a specifier will only be considered a match if they have the exact same name and version as the local dependency.
Environment
- OS: macOS 11.4
- Node: 16.5.0
- npm: 7.21.0
andersk
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next stepsRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release