Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
If you npm -g a scoped package, running npx against it will ask if you want to install it (or fail with --no).
Expected Behavior
npx should use globally installed scoped packages.
Steps To Reproduce
Does not work when installed globally:
✔ ~/devel/experiments/npx-global
16:29 $ npm i -g @commitlint/cli
added 171 packages, and audited 172 packages in 13s
23 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
✔ ~/devel/experiments/npx-global
16:30 $ npx --no @commitlint/cli
npm ERR! canceled
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/dominykas/.npm/_logs/2021-11-17T14_30_15_850Z-debug.log
Works when installed locally:
✘-1 ~/devel/experiments/npx-global
16:30 $ npm i @commitlint/cli
added 171 packages, and audited 172 packages in 2s
23 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
✔ ~/devel/experiments/npx-global [0]
16:30 $ npx --no @commitlint/cli
@commitlint/cli@15.0.0 - Lint your commit messages
Works when using an unscoped package:
✔ ~/devel/experiments/npx-global [0]
16:35 $ npm i -g eslint
added 88 packages, and audited 89 packages in 3s
13 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
✔ ~/devel/experiments/npx-global [0]
16:35 $ npx --no -- eslint -v
v8.2.0
Environment
- npm: v8.1.3
- Node: v16.3.0
- OS: macos
- platform:
- npm config:
; copy and paste output from `npm config ls` here
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
If you
npm -ga scoped package, runningnpxagainst it will ask if you want to install it (or fail with--no).Expected Behavior
npxshould use globally installed scoped packages.Steps To Reproduce
Does not work when installed globally:
Works when installed locally:
Works when using an unscoped package:
Environment
; copy and paste output from `npm config ls` here