electron-egg icon indicating copy to clipboard operation
electron-egg copied to clipboard

生成的窗口 空白 不停转圈

Open zhugw opened this issue 3 years ago • 3 comments

frontend目录下执行

npm run serve

OK

 App running at:
  - Local:   http://localhost:8080/
  - Network: http://192.168.3.155:8080/

访问 http://localhost:8080/ 也是OK的

image

但是 根目录下 执行

npm run dev

生成的弹窗 空白页面 不停的转圈 不知何故

zhugw avatar Jan 04 '22 10:01 zhugw

提供一下服务端和前端的运行日志,用 devtools 查看一下转圈的页面有没有报错。

illuz avatar Jan 04 '22 15:01 illuz

@illuz 服务端日志正常

2022-01-05 14:51:18,264 INFO 88459 [master] egg started on http://0.0.0.0:7068 (2120ms)
14:51:18.264 › [main] [startServer] startRes: success

前端确实有个报错 image

zhugw avatar Jan 05 '22 06:01 zhugw

@zhugw 看了下报错所在行,应该是你的前端代码把 process.version 干掉了?你可以试试在这边直接加 debugger 调试看看。

image

我确实是有看到过有些框架为了在前端使用 path 包,将 process.version 和 process.platform 在 vite 上设置成 null,你可以全局搜一下是不是哪改了 process。

illuz avatar Jan 06 '22 02:01 illuz