Crates.io | nenv |
lib.rs | nenv |
version | 0.5.2 |
source | src |
created_at | 2023-01-23 09:32:21.211175 |
updated_at | 2023-02-05 18:57:53.391676 |
description | A low permission nodejs environment manager. |
homepage | |
repository | https://github.com/Trivernis/nenv |
max_upload_size | |
id | 765681 |
size | 190,876 |
A Node environment manager written in rust.
Written in fast and safe rust
Multiple active nodejs versions at the same time
Configuration for project specific versions
Version matching with semver expressions
You can either
cargo install --path .
insideNow to initialize everything install any nodejs version with nenv install <version>
.
Afterwards add the bin
directory to your PATH
variable.
On windows this should be C:\Users\<yourusername>\AppData\Roaming\nenv\bin
.
On linux this will be ~/.local/share/nenv/bin
.
# install the latest available node version
nenv install latest
# install the latest lts version
nenv install lts
# install the latest 14.x.x version.
nenv install 14
nenv default latest
nenv refresh
# rome will always be executed with the lts version
nenv pin rome lts
# tsc will always be executed with the latest typescript version
nenv pin tsc latest
# undo
nenv unpin rome
nenv unpin tsc
nenv list-versions
The node version nenv uses is controlled by
engines.node
config field in the package.json
which is parsed as a semver requirement.{
"name": "my project",
"engines": {
"node": "18"
}
}
.node-version
file in the current or parent directories which contains the version string.19.4.0
NODE_VERSION
environment variable.nenv default
.GPL-3.0