安装淘宝镜像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

就可以了

相关推荐
fastjson_1 天前
Hadoop之Yarn
大数据·hadoop·npm
晓得迷路了2 天前
栗子前端技术周刊第 141 期 - Next.js 16.3、npm 安全事件、2026 CSS 现状调查报告结果...
前端·javascript·npm
周小董2 天前
[1367]npm 安装 canvas 报错 node-gyp ERR
前端·npm·node.js
MartinYeung54 天前
npm爆发大规模供应链攻击 蠕虫污染 2000+ 个包版本: 深度技术剖析
前端·npm·node.js
无责任此方_修行中7 天前
换个版本号就能升级?可没那简单:pnpm 11 升级踩坑记
javascript·后端·npm
leslie1189 天前
npm常用命令
前端·npm
不在逃避q10 天前
Trae/Vs Code/Cursor命令行无法跑npm命令
前端·arcgis·npm
半句唐诗10 天前
我是如何通过 Access Token 成功发布第一个 npm 包的
前端·npm·node.js
NutShell Wang12 天前
零依赖架构实战:451个HTML文件如何用63KB平均体积交付3584个交互模块
前端·人工智能·arcgis·npm·开源·html·vibe coding