Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions docs/lang/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,30 @@ npm = "11.12.1"
The pinned npm version takes precedence over the one bundled with Node, so `npm --version` will
always return the version specified in `mise.toml`.

## `.nvmrc` and `.node-version` support
## `.nvmrc`, `.node-version` and `package.json` support

By default, mise uses a `mise.toml` file for auto-switching between software versions.

It also supports `.tool-versions`, `.nvmrc` or `.node-version` file to find out what version of Node.js should be used. This will be used if `node` isn't defined in `mise.toml`.
It also supports `.tool-versions` file to specify versions for ASDF compatibility. Additionally, `.nvmrc`, `.node-version`, and the `devEngines` field in `package.json` are supported but require explicit enabling (see tip below).

This makes it a drop-in replacement for `nvm`. See [idiomatic version files](/configuration.html#idiomatic-version-files) for more information.

::: tip
Idiomatic version files (`.nvmrc`, `.node-version`, `devEngines` field in `package.json`) are disabled by default and must be explicitly enabled:

```sh
mise settings add idiomatic_version_file_enable_tools node
```

Or in `~/.config/mise/config.toml`:

```toml
[settings]
idiomatic_version_file_enable_tools = ["node"]
```

:::

## Default node packages

mise-node can automatically install a default set of npm packages right after installing a node version. To enable this feature, provide a `$HOME/.default-npm-packages` file that lists one package per line, for example:
Expand Down
Loading