NPM: 日常开发环境配置

1. 下载、安装

下载地址:https://nodejs.org/en/

安装:和安装其他软件一样

2. 查看 npm 配置

通过 npm config list 命令查看配置

3. 配置

# 设置NPM prefix目录,即本地库目录
npm config set prefix "D:/npm_repo"
# 设置 NPM cache目录
npm config set cache "D:/npm_cache"

  

4. 更改为 阿里云 镜像

npm config set registry https://registry.npm.taobao.org --global
npm config set disturl https://npm.taobao.org/dist --global

  

原文地址:https://www.cnblogs.com/f1194361820/p/12486148.html