1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-30 09:40:09 +00:00
ohmyzsh/plugins/npx/README.md
Marc Cornellà 3b1699b595
npx: deprecate plugin
Fixes #9366
2020-10-21 20:01:10 +02:00

1.3 KiB

NPX Plugin

npx(1) -- execute npm package binaries. (more info)

This plugin automatically registers npx command-not-found handler if npx exists in your $PATH.

To use it, add npx to the plugins array in your zshrc file:

plugins=(.... npx)

Note

The shell auto-fallback doesn't auto-install plain packages. In order to get it to install something, you need to add @:

➜  jasmine@latest # or just `jasmine@`
npx: installed 13 in 1.896s
Randomized with seed 54385
Started

It does it this way so folks using the fallback don't accidentally try to install regular typoes.

Deprecation

Since npm v7, npx has been moved to npm exec. With the move, the --shell-auto-fallback argument for npx has been removed:

Shell fallback functionality is removed, as it is not advisable.

When using npm v7, you'll get this error:

npx: the --shell-auto-fallback argument has been removed

If you get this error, just disable the plugin by removing it from the plugins array in your zshrc file. This plugin will no longer be maintained and will be removed in the future, when the older npx versions are no longer available.