mac 安装cnpm 淘宝镜像记录

mac 淘宝镜像记录

本文介绍了在安装cnpm时遇到权限问题的解决方案,包括使用sudo,处理SSL证书过期,以及因版本不一致导致的错误处理方法,步骤包括设置npm配置、卸载和重新安装cnpm到特定版本。

安装

bash 复制代码
npm install cnpm -g --registry=https://registry.npm.taobao.org

会报错 没有权限,这时需要加上sudo

bash 复制代码
sudo npm install cnpm -g --registry=https://registry.npm.taobao.org

这时候如果有些人会报错,证书过期不能访问之类的

需要加上

bash 复制代码
npm config set strict-ssl false
相关推荐
梅孔立12 小时前
Codex 完整教程(Node.js安装 + npm安装Codex + DeepSeek配置 + 快捷键 + 设置)
前端·npm·node.js
AlfredZhao8 天前
npm 源切换:一条命令搞定
npm
@tangguo1238 天前
npm 和 yarn 配置说明
前端·javascript·npm·node.js·yarn
钝挫力PROGRAMER12 天前
npx 与 npm 全局安装/更新/卸载
npm·npx·mcp·dsh
天若有情67314 天前
开源轻量双语工具|一键批量查询 NPM 包历史下载量,支持按作者批量统计
javascript·npm·github pages·开源工具·netlify·前端开源·npm克隆量
柚稚姐姐18 天前
npm install pnpm -g npm error code EACCES npm error syscall symlink
前端·npm·node.js
晴天1620 天前
npm install -f(--force)深度解析:作用原理、报错根源与风险避坑指南
前端·npm·node.js
晴天1620 天前
.npmrc 配置文件全解析:从换源到工程化的完整指南
npm·npmrc
晴天1621 天前
peerDependencies 全面解析:前端依赖生态的核心机制与实战指南
前端·npm
晴天1623 天前
打造自己的 npm 包实战指南
前端·npm·node.js