When running an NPM package with npx
for the first time, it will display a prompt asking if you want to download the package.
For example, if you ran the command npx some-npm-package
, you would receive the following prompt:
Need to install the following packages:
some-npm-package
Ok to proceed? (y)
This is a problem if npx
is being executed programmatically and you are unable to type input manually.
How can I automatically accept this prompt?