Install

Init

mix npm.init

Create package.json.

Install all

mix npm.install

Install dependencies from package.json.

Add package

mix npm.install lodash
mix npm.install lodash@^4.17

Add a dependency.

Add dev package

mix npm.install eslint --save-dev

Add to devDependencies.

Frozen install

mix npm.ci
mix npm.install --frozen

Fail if lockfile is stale.

Fetch lockfile

mix npm.get

Link from npm.lock without re-resolving.

Inspect

List

mix npm.list
mix npm.ls

Tree

mix npm.tree

Why

mix npm.why accepts

Outdated

mix npm.outdated

Info

mix npm.info express
mix npm.view express
mix npm.search react

Run

Script

mix npm.run build

Binary

mix npm.exec eslint .

Security

Vulnerability audit

mix npm.audit

OSV online audit

mix npm.audit --osv

Refresh OSV cache

mix npm.audit --osv --write-cache --policy warn

Offline compromised audit

mix npm.audit --compromised

Verify install

mix npm.verify
mix npm.check

Maintenance

Update

mix npm.update
mix npm.update lodash

Remove

mix npm.remove lodash
mix npm.uninstall lodash

Cache

mix npm.cache status
mix npm.cache clean

Config

mix npm.config