I'm trying to execute a scoped package using npx. It seems like the only way to do it is specify the package directly, e.g.:
npx -p @foo/bar bar
Which will correctly download @foo/bar
and run the bar
entry in my package.json
"bin" section:
"bin": {
"bar": "./cli.js"
}
But, what I really want is to type this:
$ npx @foo/bar
npx: installed 1 in 4s
npx: command not found: bar
I've tried @foo/bar
, foo/bar
, bar
in the bin
section, no luck. Does npx support scoped packages like this?
'bar' is not recognized as an internal or external command, operable program or batch file.
– Sublingual