当前位置: 首页 > Web前端 > vue.js

npmchangesource

时间:2023-04-01 01:46:02 vue.js

使用npm命令执行相关操作时npmchangesource速度慢。这时候可以使用changesource或者使用cnpm来解决问题。1、更改下载源有两种常见的方式。下面以淘宝源为例。1、暂时使用npm--registryhttps://registry.npm.taobao.orginstallxxx2。永久使用npmconfigsetregistryhttps://registry.npm.taobao.org配置完成后,使用如下命令查看是否配置成功npmconfiggetregistry2.使用cnpm命令通过全局安装cnpm以下命令:npminstall-gcnpm--registry=https://registry.npm.taobao.org安装完成后,就可以使用cnpm命令了。使用时,将npm替换为cnpm。可以,如:cnpminstallxxx