惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Vulnerabilities – Threatpost
U
Unit 42
F
Fortinet All Blogs
aimingoo的专栏
aimingoo的专栏
P
Proofpoint News Feed
F
Full Disclosure
月光博客
月光博客
Engineering at Meta
Engineering at Meta
博客园_首页
The Register - Security
The Register - Security
G
Google Developers Blog
The Cloudflare Blog
博客园 - Franky
K
Kaspersky official blog
A
Arctic Wolf
Scott Helme
Scott Helme
C
Cisco Blogs
Hugging Face - Blog
Hugging Face - Blog
C
Check Point Blog
NISL@THU
NISL@THU
AI
AI
D
DataBreaches.Net
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Stack Overflow Blog
Stack Overflow Blog
Project Zero
Project Zero
The GitHub Blog
The GitHub Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
量子位
Vercel News
Vercel News
T
Tor Project blog
P
Privacy International News Feed
D
Docker
I
Intezer
L
LangChain Blog
P
Proofpoint News Feed
Security Latest
Security Latest
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
博客园 - 聂微东
AWS News Blog
AWS News Blog
Martin Fowler
Martin Fowler
P
Privacy & Cybersecurity Law Blog
V
V2EX
Last Week in AI
Last Week in AI
C
Cybersecurity and Infrastructure Security Agency CISA
The Hacker News
The Hacker News
T
Tenable Blog
Blog — PlanetScale
Blog — PlanetScale
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog

孙琪峥

端午安康!博客进行了主题升级 - 孙琪峥 群晖NAS MySQL无法外部连接的解决办法 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 群晖NAS MySQL无法外部连接的解决办法 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 “npm warn Unknown project config "electron_mirror". This will stop working in the next major version of npm”的解决方案 - 孙琪峥 鱼贝贝文件信息批量提取神器v1.3.0.250118 免费|绿色免安装|全功能离线版 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 鱼贝贝文件信息批量提取神器v1.3.0.250118 免费|绿色免安装|全功能离线版 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 phpstudy启动报错nginx: [emerg] invalid number of arguments in "include" directive in 的解决方法 - 孙琪峥 phpstudy启动报错nginx: [emerg] invalid number of arguments in "include" directive in 的解决方法 - 孙琪峥 微信小程序《隐私政策》范文参考 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 微信小程序《隐私政策》范文参考 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 electron开发中使用nodemon进行热更新的方法 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 electron开发中使用nodemon进行热更新的方法 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 electron开发,文件无法拖放到渲染窗口的一种奇怪情况,附原因和解决方案 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 electron开发,文件无法拖放到渲染窗口的一种奇怪情况,附原因和解决方案 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 moment.js日期时间插件,设置中文语言的方法 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 moment.js日期时间插件,设置中文语言的方法 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 使用npm安装electron失败的可行解决方案 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 使用npm安装electron失败的可行解决方案 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 Windows11系统cmd终端提示“命令提示符已被系统管理员停用”的一种可行解决方案 - 孙琪峥 - 比花言巧语更难的是学会闭嘴 Windows11系统cmd终端提示“命令提示符已被系统管理员停用”的一种可行解决方案 - 孙琪峥 - 比花言巧语更难的是学会闭嘴
“npm warn Unknown project config "electron_mirror". This will stop working in the next major version of npm”的解决方案 - 孙琪峥
admin · 2025-09-11 · via 孙琪峥

最近老孙的一个electron项目,通过命令行启动时,有两行提示:

npm warn Unknown project config "electron_mirror". This will stop working in the next major version of npm.
npm warn Unknown project config "electron_builder_binaries_mirror". This will stop working in the next major version of npm.

提示大意是当前的electron_mirror和electron_builder_binaries_mirror配置国内镜像源的方式,在后续的major版本不会再被支持。

排查一下,当前项目默认是通过项目根目录下.npmrc文件中配置的。

解决方法如下:

第一步

将ELECTRON_MIRROR和ELECTRON_BUILDER_BINARIES_MIRROR设置为系统环境变量。可以在系统属性中设置,也可以直接通过cmd命令设置,cmd命令如下:

setx ELECTRON_MIRROR "https://npmmirror.com/mirrors/electron/"
setx ELECTRON_BUILDER_BINARIES_MIRROR "https://npmmirror.com/mirrors/electron-builder-binaries/"

大家注意校对一下名称和对应的地址和.npmrc文件中是否一致。

第二步

注释或删除掉.npmrc文件中对应的配置。

第三步

重启电脑