zkat / npx

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

Running no-install with dependencies #153

Open evanplaice opened 6 years ago

evanplaice commented 6 years ago

Is it possible to add dependent packages to a non-install execution?

I'd like to use npx to eliminate some of the 'tools' dependencies from my repo altogether. It doesn't make sense to maintain a local, outdated copy.

For example, running tests with mocha + chai. This works with mocha if chai is available locally. If I uninstall the local copy of chai it throws a warning. I tried using the -p command, not sure if that's what I should be using and if so what the format of the package name should be.

Is NPX capable of automatically downloading and running missing deps from the cache?

Sorry in advance to ask a support question here. I can usually find an answer online but NPX is still a bit too new to have a lot of good resources online.

zkat commented 6 years ago

This should be fixed by #160 -- the issue is that npx does not make libraries available right now. Only binaries.