We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
原文地址: https://www.yuque.com/egg/nodejs/nvs
$ export NVS_HOME="$HOME/.nvs" $ git clone https://github.com/jasongin/nvs --depth=1 "$NVS_HOME" $ . "$NVS_HOME/nvs.sh" install
help是最完整的说明
$ nvs help
使用 nvs 时,默认的 prefix 是当前激活的 Node.js 版本的安装路径。
nvs
prefix
带来一个问题是:切换版本之后,之前安装全局命令模块需要重新安装,非常不方便。
解决方案是配置统一的全局模块安装路径到 ~/.npm-global,如下:
~/.npm-global
$ mkdir -p ~/.npm-global $ npm config set prefix ~/.npm-global
还需配置环境变量到 ~/.bashrc 或 ~/.zshrc 文件里
~/.bashrc
~/.zshrc
$ echo "export PATH=~/.npm-global/bin:$PATH" >> ~/.zshrc $ source ~/.zshrc
$ npm root -g
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
原文地址: https://www.yuque.com/egg/nodejs/nvs
安装nvs
使用指南
help是最完整的说明
$ nvs help
公用npm全局安装路径
使用
nvs
时,默认的prefix
是当前激活的 Node.js 版本的安装路径。带来一个问题是:切换版本之后,之前安装全局命令模块需要重新安装,非常不方便。
解决方案是配置统一的全局模块安装路径到
~/.npm-global
,如下:还需配置环境变量到
~/.bashrc
或~/.zshrc
文件里查看npm全局路径
The text was updated successfully, but these errors were encountered: