首页 > 编程语言 >nodeConfig

nodeConfig

时间:2023-12-01 22:22:18浏览次数:34  
标签:node npm set config nodeConfig nvm soft

node


node管理工具

settings
#nvm下载后,设置镜像
root: D:\soft\nvm
path: D:\soft\nodejs
arch: 64
proxy: none
node_mirror: http://npm.taobao.org/mirrors/node/
npm_mirror: https://npm.taobao.org/mirrors/npm/


下载node版本

#下载node
nvm install 14.21.3
#查看下载的node
nvm list
#切换node版本
nvm use 14.21.3
#查看镜像源
npm get registry
#更换成淘宝镜像源
npm config set registry http://registry.npm.taobao.org/
#还原默认镜像
npm config set registry https://registry.npmjs.org

设置缓存和全局配置

#设置cache
npm set config cache "D:\soft\nodejs\node-cache"
#设置npm全局安装配置
npm set config prefix "D:\soft\nodejs\node-global"
#设置环境变量
NPM_HOME
D:\soft\nodejs\node-global
#设置nvm环境变量
NVM_HOME
D:\soft\nvm
#设置node的快捷位置
NVM_SYMLINK
D:\soft\nodejs

安装nrm

#nrm是npm的镜像管理工具
npm install -g nrm
#查看npm镜像
nrm ls

nodejsZIP

#npm全局安装位置
node-globale
#npm 缓存路径
node-cache
#nodehome
D:\soft\node-v16.17.1-win-x64
#全局
D:\soft\node-v16.17.1-win-x64\node-globale
#cache
npm set config cache "D:\soft\node-v16.17.1-win-x64\node-cache"
#global
npm set config prefix "D:\soft\node-v16.17.1-win-x64\node-globale"

node安装

#全局
npm set config prefix "D:\soft\nodejs"

标签:node,npm,set,config,nodeConfig,nvm,soft
From: https://www.cnblogs.com/yanglong226/p/17870976.html

相关文章