Add packages
mix npm.install lodash
mix npm.install lodash@^4.17
mix npm.install @types/node@^20
By default packages are saved to dependencies.
Development dependencies
mix npm.install eslint --save-dev
Development dependencies are skipped during production installs:
mix npm.install --production
Exact versions
mix npm.install lodash --save-exact
Without --save-exact, npm_ex uses npm-style semver ranges when adding registry packages.
Remove packages
mix npm.remove lodash
mix npm.uninstall is also available as an alias.
Update packages
Update all packages within their configured ranges:
mix npm.update
Update one package:
mix npm.update lodash
Inspect dependencies
mix npm.list
mix npm.tree
mix npm.why accepts
mix npm.outdated
mix npm.deprecations
mix npm.licenses
Fetch from lockfile
If npm.lock already exists, fetch and link locked packages without re-resolving:
mix npm.get
Clean installed packages
mix npm.clean
This removes node_modules/. The global cache is left intact.
Cache maintenance
mix npm.cache status
mix npm.cache clean
Downloaded packages are cached globally so repeated installs across projects reuse the same package contents.