Hugo博客公告弹窗

切换npm为国内镜像源,加速依赖包下载

   
文章摘要
摘要小助理今天溜号啦……😜

国内npm镜像源

国内npm镜像源

阿里云 NPM 镜像:https://npm.aliyun.com 腾讯云 NPM 镜像:https://mirrors.cloud.tencent.com/npm/ 华为云 NPM 镜像:https://mirrors.huaweicloud.com/repository/npm/

指定npm镜像源

npm config set registry https://mirrors.huaweicloud.com/repository/npm/

返回npm 官方原始镜像

npm config set registry https://registry.npmjs.org/

清除缓存,可选

npm cache clean -f

查看当前的镜像源

npm config get registry

其他命令

查询全局包存放地址

npm config get prefix

查询缓存地址

npm config get cache

查看全局安装的包列表

npm list -g --depth=0

删除模块 : 例如删除gulp-cli

npm uninstall -g gulp-cli
CC BY-NC-SA 4.0 转载请注明
最后更新于 2024-09-07 17:29
clarity统计