-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Labels
Bugthing that needs fixingthing that needs fixingRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release
Milestone
Description
Current Behavior:
If a package foo
that exposes a binary is installed globally, npm 7's npx foo
does not work as expected. It asks whether to install foo
rather than executing the already-installed binary.
This issue also occurs if the binary does not share the package name (e.g. if foo
exposes binary bar
, then npx bar
doesn't work either).
Expected Behavior:
npx foo
should invoke a globally-installed foo
, as in npm@6. Or, if this change is intentional, could it be mentioned alongside the other breaking changes to npx
in the npm@7 release notes?
Steps To Reproduce:
- Run
npm install -g npm-check-updates
. - Run
ncu
. It successfully runs thenpm-check-updates
binary, as expected. - Run
npx ncu
. It does not run the binary. Instead, it asks whether it can install thencu
package:
Need to install the following packages:
ncu
Ok to proceed? (y)
Environment:
- OS: macOS 10.15.6
- node: 14.9.0
- npm: 7.0.0-beta.7
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release