使用NVM管理Node - Windows
发布时间:2020-12-14 02:40:45 所属栏目:Windows 来源:网络整理
导读:安装 NVM NVM 下载: https://github.com/coreybutler/nvm-windows 安装 Node 注意:如果没有FQ默认源可能安装npm失败,请参考下一节“安装 NPM”修改 镜像源地址。 查看可用版本: nvm ls available 安装Node: nvm install [version] 指定使用版本: nvm u
安装 NVM NVM 下载:https://github.com/coreybutler/nvm-windows 安装 Node 注意:如果没有FQ默认源可能安装npm失败,请参考下一节“安装 NPM”修改镜像源地址。
安装 NPM nvm全称Node Version Manager是 Nodejs 版本管理器,它让我们能方便的对 Nodejs 的版本进行切换。 使用默认源可能安装npm失败,需要修改../nvm/settings.txt文件,添加如下配置。 root: C:devnvm
path: C:devnodejs
arch: 64
proxy: none
node_mirror: http://npm.taobao.org/mirrors/node/
npm_mirror: https://npm.taobao.org/mirrors/npm/
安装NRM nrm(npm registry manager)是npm的镜像源管理工具,有时候国外资源太慢,那么我们可以用这个来切换镜像源。
NVM 命令 Usage: nvm arch : Show if node is running in 32 or 64 bit mode. nvm install <version> [arch] : The version can be a node.js version or "latest" for the latest stable version. Optionally specify whether to install the 32 or 64 bit version (defaults to system arch). Set [arch] to "all" to install 32 AND 64 bit versions. Add --insecure to the end of this command to bypass SSL validation of the remote download server. nvm list [available] : List the node.js installations. Type "available" at the end to see what can be installed. Aliased as ls. nvm on : Enable node.js version management. nvm off : Disable node.js version management. nvm proxy [url] : Set a proxy to use for downloads. Leave [url] blank to see the current proxy. Set [url] to "none" to remove the proxy. nvm node_mirror [url] : Set the node mirror. Defaults to https://nodejs.org/dist/. Leave [url] blank to use default url. nvm npm_mirror [url] : Set the npm mirror. Defaults to https://github.com/npm/npm/archive/. Leave [url] blank to default url. nvm uninstall <version> : The version must be a specific version. nvm use [version] [arch] : Switch to use the specified version. Optionally specify 32/64bit architecture. nvm use <arch> will continue using the selected version,but switch to 32/64 bit mode. nvm root [path] : Set the directory where nvm should store different versions of node.js. If <path> is not set,the current root will be displayed. nvm version : Displays the current running version of nvm for Windows. Aliased as v. 参考链接 https://www.runoob.com/w3cnote/nvm-manager-node-versions.html https://blog.csdn.net/qq_27626333/article/details/77857223 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 在Windows 7 x64 PC上安装node.js上的回滚
- Windows – Visual Studio代码安装位置
- Windows – 如何将多个文件名传递给上下文菜单Shell命令?
- windows – 如何在用户创建挂载点时收到通知?
- windows-phone-7 – 无法从c#访问应用程序按钮(Windows Pho
- 为什么win32异常不被c#异常处理机制所捕获
- windows-server-2008 – FTP服务器的建议,允许限制用户的文
- .net – WPF Handyness与弹出窗口
- windows – 作为服务运行时,QtService应用程序无法连接到系
- windbg – 为什么sosex!dlk在Windows 7上永远运行?
推荐文章
站长推荐
- windows – 最小延迟的串行通信
- wcf – 使用TcpClientCredentialType.Windows时的
- Windows上的应用程序颜色(背景,按钮等)指南?
- 两大主流Web服务器之分析与对比
- windows-7 – 最佳实践 – Windows 7 Remote Roa
- xaml – ComboBox SelectedValue不显示
- windows – 如何在dll注入中调用特定函数?
- 如何在Windows上确定是否安装了C/C++编译器
- windows – Bootrec / FIXBOOT vs Bootrec / FIX
- windows-server-2012 – WSUS每晚下载驱动程序更
热点阅读