Running npx with not installed command opens node-cli.js in editor
Fuzzyma opened this issue · 3 comments
Mocha is not installed globally or locally
npx mocha test.js
Expected result: npx downloads mocha and executes it
Actual result: The file npm-cli.js
is opened in my editor. Full path: C:\Users\USERNAME\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
Confusing...
PS: The npx program hangs after that
PPS: Sometimes also does this when running a program which is installed locally e.g. react-native
@Fuzzyma what version of npx? We've had issues around this before and I know @katemihalikova spent a good chunk of time on this particular issue.
I wonder if this is an integration issue with how libnpx
is used in the npm side of things itself 🤔
my version is 9.2.0
Same issue for me, but npx
says
command not found: mocha
instead of hanging.