VUE npm 代理 配置

set http_proxy=http://IP:PORT
set https_proxy=http://IP:PORT
set http_proxy_user=XXXX
set http_proxy_pass=123454321

//统一保存module
npm config set cache "C:work odejs ode_cache"
npm config set prefix "C:work odejs ode_global_modules"

cnpm config set cache "C:work odejs ode_cache"
cnpm config set prefix "C:work odejs ode_global_modules"


npm root -g #查询配置

npm install -g cnpm --registry=https://registry.npm.taobao.org
npm config set registry https://registry.npm.taobao.org
npm config set registry https://registry.npmjs.org/ 原:https://registry.npmjs.org/
npm config get registry

npm install -g @vue/cli
cnpm install -g @vue/cli

发生Python错误

管理员身份打开cmd
npm install -g node-gyp
npm install --global --production windows-build-tools
npm uninstall node-sass
npm i node-sass --sass_binary_site=https://npm.taobao.org/mirrors/node-sass/

//npm配置文件

C:Usersxxx.npmrc

原文地址:https://www.cnblogs.com/whmbky/p/13627933.html