zkat / npx

execute npm package binaries (moved)
https://github.com/npm/npx
Other
2.63k stars 105 forks source link

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

Open Fuzzyma opened 7 years ago

Fuzzyma commented 7 years ago

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

zkat commented 7 years ago

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

Fuzzyma commented 7 years ago

my version is 9.2.0

xehpuk commented 5 years ago

Same issue for me, but npx says

command not found: mocha

instead of hanging.