.net 电子项目无法在新的Mac Air 2上工作

rt4zxlrg  于 2023-02-10  发布在  .NET
关注(0)|答案(1)|浏览(132)

我正在尝试从此存储库克隆项目:https://github.com/ruidfigueiredo/electron-cgi-calculator-demo。但是一旦我执行npm安装,我会得到这些错误:

npm ERR! code 1
npm ERR! path /Users/mohitbhavsar/Desktop/electron-cgi-calculator-demo-

master/node_modules/electron
npm ERR! command failed
npm ERR! command sh -c -- node install.js
Downloading tmp-1202-0-electron-v4.0.4-darwin-arm64.zip
npm ERR! Error: GET https://github.com/electron/electron/releases/download/v4.0.4/electron-v4.0.4-darwin-arm64.zip returned 404
npm ERR! /Users/mohitbhavsar/Desktop/electron-cgi-calculator-demo-master/node_modules/electron/install.js:49
npm ERR!   throw err
npm ERR!   ^
npm ERR! 
npm ERR! Error: Failed to find Electron v4.0.4 for darwin-arm64 at https://github.com/electron/electron/releases/download/v4.0.4/electron-v4.0.4-darwin-arm64.zip
npm ERR!     at Request.<anonymous> (/Users/mohitbhavsar/Desktop/electron-cgi-calculator-demo-master/node_modules/nugget/index.js:169:61)
npm ERR!     at Request.emit (node:events:513:28)
npm ERR!     at Request.onRequestResponse (/Users/mohitbhavsar/Desktop/electron-cgi-calculator-demo-master/node_modules/request/request.js:1066:10)
npm ERR!     at ClientRequest.emit (node:events:513:28)
npm ERR!     at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:693:27)
npm ERR!     at HTTPParser.parserOnHeadersComplete (node:_http_common:117:17)
npm ERR!     at TLSSocket.socketOnData (node:_http_client:534:22)
npm ERR!     at TLSSocket.emit (node:events:513:28)
npm ERR!     at addChunk (node:internal/streams/readable:324:12)
npm ERR!     at readableAddChunk (node:internal/streams/readable:297:9)
npm ERR! 
npm ERR! Node.js v18.12.0

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/mohitbhavsar/.npm/_logs/2023-02-06T17_07_35_382Z-debug-0.log

接下来,当我启动npm时,项目打开了,但是我不能点击任何东西,也不能对应用程序进行任何更改。我该怎么办?
我安装了电子和电子cgi软件包,以及,但它仍然不工作。

bxgwgixi

bxgwgixi1#

https://www.npmjs.com/package/electron开始,
macOS(高Sierra及以上):Electron为macOS提供64位Intel和ARM二进制文件。在Electron 11中增加了对Apple Silicon的支持。
因此,请使用更新版本的Electron。
你必须很好地请求项目所有者,或者自己修改它。
或者,您可以尝试overriding the dependency version

相关问题