返回

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

   
摘要GPT
摘要小助理暂时失联跑路啦……😜

国内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-07-17 18:28
使用 Hugo 构建
主题 hugo-magic小洋葱 魔改 由 Jimmy 设计
Written by Human, Not by AI