安装淘宝镜像cnpm报错

npm 安装淘宝镜像报错

npm install -g cnpm --registry=https://registry.npm.taobao.org

安装报

The operation was rejected by your operating system.

npm ERR! It's possible that the file was already in use (by a text editor or antivirus),

npm ERR! or that you lack permissions to access it.

npm ERR!

-4048

解决办法

把这句命令

npm install -g cnpm --registry=https://registry.npm.taobao.org

改成指定版本就好了(版本号可以根据自己需求来)

npm install -g cnpm@7.1.1 --registry=https://registry.npm.taobao.org

就可以了

相关推荐
@tangguo1237 小时前
npm 和 yarn 配置说明
前端·javascript·npm·node.js·yarn
钝挫力PROGRAMER4 天前
npx 与 npm 全局安装/更新/卸载
npm·npx·mcp·dsh
天若有情6736 天前
开源轻量双语工具|一键批量查询 NPM 包历史下载量,支持按作者批量统计
javascript·npm·github pages·开源工具·netlify·前端开源·npm克隆量
张某布响丸辣9 天前
Node 16 下用 pdfjs + @napi-rs/canvas 把中文 PDF 渲染成图片
pdf·node·字体映射
柚稚姐姐10 天前
npm install pnpm -g npm error code EACCES npm error syscall symlink
前端·npm·node.js
晴天1611 天前
npm install -f(--force)深度解析:作用原理、报错根源与风险避坑指南
前端·npm·node.js
晴天1611 天前
.npmrc 配置文件全解析:从换源到工程化的完整指南
npm·npmrc
DreamLife☼12 天前
Agent开发环境搭建完全指南
python·docker·typescript·node·工业知识点
晴天1612 天前
peerDependencies 全面解析:前端依赖生态的核心机制与实战指南
前端·npm
大牧师13 天前
MySQL 学习教程
数据库·sql·mysql·docker·node·全栈·后端数据