Default selection for bin entry point is unexpected
connorjclark opened this issue · comments
Version: 10.2.0
Command:
npx lighthouse --help
Expected: Lighthouse CLI prints help summary
Actual: Nothing
If using npx 6.4.1
, it's more obvious what is happening. Output w/ that version:
✨ Chrome debugging port: 64025
This is the other bin
entry that lighthouse
defines. For reference:
"bin": {
"lighthouse": "./lighthouse-cli/index.js",
"chrome-debug": "./lighthouse-core/scripts/manual-chrome-launcher.js"
}
Seems to come down to this logic: https://github.com/zkat/npx/blob/latest/index.js#L94
Could this be modified to select the entry point that shares the same name as the package?
In the mean time, specifying the bin entry point manually works.
npx -p lighthouse@3.2.0 lighthouse --version