# `Volt.NPM`
[🔗](https://github.com/elixir-volt/volt/blob/v0.17.10/lib/volt/npm.ex#L1)

Installs exact npm package sets into Volt's isolated, npm_ex-backed cache.

Frameworks and plugins can use this API for JavaScript dependencies they own
without adding those packages to an application's `node_modules` directory.
The returned directory is stable for the normalized package set and can be
passed to `Volt.Builder` as a package directory or scoped package root.

Pass a package-owned npm_ex lockfile to make fresh installs consume its exact
transitive graph without contacting the registry resolver:

    Volt.NPM.install!(packages, lockfile: Volt.Priv.path(:my_app, "npm.lock"))

The lockfile must use npm_ex lockfile version 1, match the current security
policy, and contain every direct package at its declared exact version.

# `install_result`

```elixir
@type install_result() :: %{install_dir: String.t(), node_modules: String.t()}
```

# `install!`

```elixir
@spec install!(
  %{required(String.t()) =&gt; String.t()},
  keyword()
) :: install_result()
```

Install a package map and return its isolated cache directories.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
