Open libinvarghese opened 6 years ago
Ref #105.
I would think --no-install
should be the default behavior (principle of least surprise; see: https://github.com/npm/npm/issues/19673#issue-290707657). And in that case, if the command is not found, npx's console output should give a hint about the possibility of using an --install
flag, i.e. instead of only reporting not found: <cmd>
.
should be the default behavior
I agree with this sentiment.
However I think there should also be a config available for npx
. Should we raise a separate issue for that? #105 requests that, but people keep focusing on the --no-install
option specifically.
This is clone of https://github.com/npm/npm/issues/19673 and seems relevant here.
Running npx [command] will auto-install and auto-run a module if not installed. This is a handy feature. However there are few scenarios where
--no-install
is helpful.To avoid using
--no-install
in every npx command, couldno-install
be set in a config file likenpxrc
or inpackage.json
as below: