npx icon indicating copy to clipboard operation
npx copied to clipboard

Running npx with not installed command opens node-cli.js in editor

Open Fuzzyma opened this issue 8 years ago • 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 avatar Sep 03 '17 12:09 Fuzzyma

@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 🤔

zkat avatar Sep 15 '17 17:09 zkat

my version is 9.2.0

Fuzzyma avatar Sep 15 '17 17:09 Fuzzyma

Same issue for me, but npx says

command not found: mocha

instead of hanging.

xehpuk avatar Mar 07 '19 15:03 xehpuk