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

就可以了

相关推荐
江屿风2 天前
【Plain Language Large Model】【从浏览器到全栈:一课精通Node.js三剑客】流食般投喂
笔记·前端框架·npm·node.js·js·npx
少年的范儿4 天前
Windows 安装 Node.js 教程:nvm 版本管理 + pnpm 安装配置
windows·npm·node.js
peach4 天前
同样是装依赖,为什么 npm 长成 node_modules,Maven 长成 .m2
npm·node.js·maven
chunyublog6 天前
HDFS 上传文件名空格问题排障教程
前端·javascript·npm
MasonYyp7 天前
安装npm依赖仓库Verdaccio
前端·npm·node.js
jiangliushi68 天前
GPT-6.1 Sol 免费用:PowerShell 装 Codex 报“禁止运行脚本 npm.ps1”?一条命令解决
前端·gpt·npm
Elcker9 天前
YnuoAgent(依诺):一个 npm 包,跑起属于自己的 AI 研发平台
前端·人工智能·npm
Patrick_Wilson12 天前
悬浮提示从哪来:LSP、tsserver 与 .d.ts
typescript·npm·前端工程化
Patrick_Wilson12 天前
npm 的 bin 如何接到 npm run 与 npx
npm·node.js·前端工程化
Patrick_Wilson12 天前
import 之后发生了什么:package.json、解析与安装产物
npm·node.js·前端工程化