opensumi / ide-electron

OpenSumi Electron Version
https://opensumi.com
MIT License
171 stars 56 forks source link

mac打包后打开app是黑屏不显示任何内容是什么原因 #73

Closed lxmp closed 1 year ago

lxmp commented 1 year ago
image
lxmp commented 1 year ago

m2芯片

bytemain commented 1 year ago

打开开发者工具看一下有什么报错

lxmp commented 1 year ago

@bytemain 开发者工具也不开,没有这个选项

image
bytemain commented 1 year ago

看一下第一个菜单里呢

lxmp commented 1 year ago

就是clone下来不做任何改动,打包也是这样 @bytemain image

bytemain commented 1 year ago
image

进行这一步 rebuild 了吗

lxmp commented 1 year ago

@bytemain 大佬,现在执行这个报 image

image

进行这一步 rebuild 了吗

bytemain commented 1 year ago

这个应该是我们的 rebuild 脚本有问题,试一下:rm -rf $TMPDIR/ide_build_cache

这个构建脚本之后我们修掉

bytemain commented 1 year ago

把命令改成 pnpm rebuild-native --force-rebuild=true 应该也可以

lxmp commented 1 year ago

rebuild 不报错了,但是打出来包还是黑屏。。

erha19 commented 1 year ago

@lxmp 你从终端执行看一下具体报错,例如:

 KTLOG_SHOW_DEBUG=true /Applications/OpenSumi-OSS.app/Contents/MacOS/OpenSumi-OSS 

看一下具体报错信息?

lxmp commented 1 year ago

@erha19 @bytemain image

erha19 commented 1 year ago

@lxmp 看这里报错还是原生依赖(如 pty.node)的构建问题,建议你把 node_modules 删了,同时安装 node 的 arm64 版本,如 node 16 后进行依赖的安装构建,先在本地验证是否能正常运行再做打包。

我本地(M1 环境)用的是 16.16.0 版本 Node,打包运行是正常的。

lxmp commented 1 year ago

安装16 可以了 thanks