日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > windows >内容正文

windows

使用NVM管理Node - Windows

發(fā)布時間:2023/12/20 windows 34 豆豆
生活随笔 收集整理的這篇文章主要介紹了 使用NVM管理Node - Windows 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

安裝 NVM

  NVM 下載:https://github.com/coreybutler/nvm-windows

安裝 Node

注意:如果沒有FQ默認源可能安裝npm失敗,請參考下一節(jié)“安裝 NPM”修改鏡像源地址。

  • 查看可用版本: nvm ls available
  • 安裝Node:
    nvm install [version]
  • 指定使用版本: nvm use [version]

安裝 NPM

  nvm全稱Node Version Manager是 Nodejs 版本管理器,它讓我們能方便的對 Nodejs 的版本進行切換。

  使用默認源可能安裝npm失敗,需要修改../nvm/settings.txt文件,添加如下配置。

root: C:\dev\nvm path: C:\dev\nodejs 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的鏡像源管理工具,有時候國外資源太慢,那么我們可以用這個來切換鏡像源。

  • 安裝nrm npm install nrm -g
  • 查看可用鏡像源 nvm>nrm ls* npm ---- https://registry.npmjs.org/cnpm --- http://r.cnpmjs.org/taobao - https://registry.npm.taobao.org/nj ----- https://registry.nodejitsu.com/rednpm - http://registry.mirror.cqupt.edu.cn/npmMirror https://skimdb.npmjs.com/registry/edunpm - http://registry.enpmjs.org/
  • 選擇使用鏡像源 nrm use taobao

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

轉(zhuǎn)載于:https://www.cnblogs.com/io_oti/p/9350653.html

總結(jié)

以上是生活随笔為你收集整理的使用NVM管理Node - Windows的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。