一、进入官网地址下载安装包


1.解压后,在该文件夹中创建2个新的空文件夹

二、配置环境变量
1.NODE_HOME

2.在Path中配置

三、验证是否安装成功
1.进入cmd命令行窗口,输入node -v查看nodejs版本
node -v
输入npm -v查看npm版本
npm -v

2.修改默认文件夹
设置全局模块的安装路径到 "node_global" 文件夹,
npm config set prefix "D:\node\node_global"
设置缓存到 "node_cache" 文件夹
Lua
npm config set cache "D:\node\node_cache"
3.设置国内镜像
1.将npm默认的registry修改为国内registry
https://registry.npmmirror.com
Lua
npm config set registry https://registry.npmmirror.com
说明:npm 默认的 registry ,也就是下载 npm 包时会从国外的服务器下载,国内下载会很慢,可以更换为国内镜像:
https://registry.npm.taobao.org(该域名已经过期了)
2.验证是否都设置成功
Lua
npm config ls

3.全局安装cnpm
Lua
npm install -g cnpm --registry=https://registry.npmmirror.com

3.2 本地查看cnpm模块

3.3 执行命令查看cnpm是否安装成功
Lua
cnpm -v
如下图所示,即代表cnpm配置成功。

四、卸载
卸载参考这篇博客就行
点击
https://blog.csdn.net/qq_42257666/article/details/129909941
1
如果是按照我的压缩包安装的,直接删除安装的文件夹即可
五、安装Vue
安装Vue参考这篇文章就好了
点击
Lua
https://blog.csdn.net/qq_42006801/article/details/124852760
参考博客视频
点击1
https://blog.csdn.net/qq_42006801/article/details/124830995
点击2