Electron38-Winchat聊天系统|vite7+electron38+vue3电脑端聊天Exe
2025年9月14日 10:35
2025最新款原创新作electron38+vite7+vue3 setup+pinia3+element-plus仿微信客户端聊天程序。
//指定版本可以改为 npm install --save-dev electron@22.3.0
npm install --save-dev electron
RequestError: connect ETIMEDOUT 20.205.243.166:443
npm error code 1
npm error path E:\project\work\xxx\xxx\node_modules\electron
npm error command failed
npm error command C:\WINDOWS\system32\cmd.exe /d /s /c node install.js
npm error RequestError: connect ETIMEDOUT 20.205.243.166:443
npm error at ClientRequest.<anonymous> (E:\project\work\xxx\xxx\node_modules\got\dist\source\core\index.js:970:111)
npm error at Object.onceWrapper (node:events:623:26)
npm error at ClientRequest.emit (node:events:520:35)
npm error at origin.emit (E:\project\work\xxx\xxx\node_modules\@szmarczak\http-timer\dist\source\index.js:43:20)
npm error at emitErrorEvent (node:_http_client:107:11)
npm error at TLSSocket.socketErrorListener (node:_http_client:574:5)
npm error at TLSSocket.emit (node:events:508:28)
npm error at emitErrorNT (node:internal/streams/destroy:170:8)
npm error at emitErrorCloseNT (node:internal/streams/destroy:129:3)
npm error at process.processTicksAndRejections (node:internal/process/task_queues:90:21)
npm error at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1637:16)
npm error A complete log of this run can be found in: C:\Users\xxx\AppData\Local\npm-cache\_logs\2025-09-08T10_00_30_300Z-debug-0.log
pnpm
npm install -g pnpm
pnpm
失败,执行如下命令npm install -g pnpm --registry=https://registry.npmmirror.com
pnpm config set registry https://registry.npmmirror.com
registry
镜像npm config get registry
.npmrc
文件,可以确保大部分走国内镜像registry=https://registry.npmmirror.com
ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/
PUPPETEER_DOWNLOAD_HOST=https://npmmirror.com/mirrors
pnpm
,考虑下载最新版 Node.js
pnpm
来安装 electron
pnpm install electron --save-dev
安装继续失败报错:ssh: connect to host github.com port 22: Connection timed out
配置Git对GitHub使用HTTPS协议
一定要加 --add
不然会被覆盖
# 配置Git对GitHub使用HTTPS协议
# 这将使Git在获取GitHub仓库时使用HTTPS而不是SSH
git config --global --add url."https://github.com/".insteadOf git@github.com:
# 或者专门针对GitHub配置
git config --global --add url."https://github.com/".insteadOf ssh://git@github.com/
git config --global --list
url.https://github.com/.insteadof=ssh://git@github.com/
url.https://github.com/.insteadOf=git@github.com:
electron
npm install
#或者
pnpm install
#等等命令
...