环境搭建--nvm

 

推荐使用nvm node 管理工具 来下载node包

(最好不要自己去官网下载)

 

一、下载nvm

https://www.jianshu.com/p/6939619c9564

nvm 常用命令:

nvm list  查看当前系统中的所有node版本

nvm use xx. 使用xx版本的node

nvm  install  8.   安装8版本的node

nvm uninstall 8. 卸载8版本的 node 

nvm -v 查看当版本

which nvm 查看nvm存放的位置

 

npm cache clean --force  清除缓存命令

--unsafe-perm。

 

 

二、安装8版本node

 nvm  install  8 

 

三、使用淘宝镜像源

 #最新地址 淘宝 NPM 镜像站喊你切换新域名啦!

 npm install -g cnpm --registry=https://registry.npmmirror.com
 
 # 注册模块镜像
 npm set registry https://registry.npmmirror.com  
 
 // node-gyp 编译依赖的 node 源码镜像  
 npm set disturl https://npmmirror.com/dist 
 
 // 清空缓存  
 npm cache clean --force  
 
 // 安装cnpm  
 npm install -g cnpm --registry=https://registry.npmmirror.com  

 

 

posted @ 2023-04-17 13:57  蜗牛般庄  阅读(27)  评论(0编辑  收藏  举报
Title
页脚 HTML 代码