nave node 的虚拟环境管理工具
nave 是类似python venv 的node 虚拟环境管理工具
安装
npm install -g nave
简单使用
- 帮助命令
Usage: nave <cmd>
Commands:
install <version> Install the version specified (ex: 12.8.0)
install <name> <ver> Install the version as a named env
use <version> Enter a subshell where <version> is being used
use <ver> <program> Enter a subshell, and run "<program>", then exit
use <name> <ver> Create a named env, using the specified version.
If the name already exists, but the version differs,
then it will update the link.
usemain <version> Install in /usr/local/bin (ie, use as your main nodejs)
clean <version> Delete the source code for <version>
uninstall <version> Delete the install for <version>
ls List versions currently installed
ls-remote List remote node versions
ls-all List remote and local node versions
latest Show the most recent dist version
cache Clear or view the cache
help Output help information
auto Find a .naverc and then be in that env
auto <dir> cd into <dir>, then find a .naverc, and be in that env
auto <dir> <cmd> cd into <dir>, then find a .naverc, and run a command
in that env
get <variable> Print out various nave config values.
exit Unset all the NAVE environs (use with 'exec')
Version Strings:
Any command that calls for a version can be provided any of the
following "version-ish" identifies:
- x.y.z A specific SemVer tuple
- x.y Major and minor version number
- x Just a major version number
- lts The most recent LTS (long-term support) node version
- lts/<name> The latest in a named LTS set. (argon, boron, etc.)
- lts/* Same as just "lts"
- latest The most recent (non-LTS) version
- stable Backwards-compatible alias for "lts".
To exit a nave subshell, type 'exit' or press ^D.
To run nave *without* a subshell, do 'exec nave use <version>'.
To clear the settings from a nave env, use 'exec nave exit'
- 安装需要的版本
nave install 10.16.3
- 使用指定版本
nave use 10.16.3 node -v
- 效果
nave use 10.16.3 node -v
v10.16.3
说明
在使用上, 基本和n 模块类似
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
2018-08-27 stardog 基本试用(社区版)