Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

页面空白,页面报错 #40

Closed
3500024137 opened this issue Mar 6, 2023 · 19 comments
Closed

页面空白,页面报错 #40

3500024137 opened this issue Mar 6, 2023 · 19 comments
Assignees
Labels
bug Something isn't working

Comments

@3500024137
Copy link

最新window版,点进页面后空白

@869413421
Copy link
Owner

查看控制台日志,看看启动了那个端口。

@3500024137
Copy link
Author

查看控制台日志,看看启动了那个端口。

我确定已打开正确的网址,网址成功加载了,但没有任何内容,这在0.5版是没有的
image

@3500024137
Copy link
Author

查看控制台日志,看看启动了那个端口。
使用手机进入也显示空白

@3500024137
Copy link
Author

我把你的0.5版本的index.html替换了0.7版本的文件,并更改了读取路径,之后可以显示页面了,但我不确定这是否是正常页面,因为只比之前多了一个复制对话的按钮
image

@3500024137
Copy link
Author

最后我将你的<script type="module" crossorigin src="/assets/index-a80dcab2.js"></script>中的type换成defer之后,页面就正常显示了,非常莫名其妙的问题

@benjaminyzhang
Copy link

同样遇到了该问题

@869413421
Copy link
Owner

869413421 commented Mar 8, 2023

请提供浏览器控制台中的信息

@benjaminyzhang
Copy link

Loading module from “http://127.0.0.1:8080/assets/index-a80dcab2.js” was blocked because of a disallowed MIME type (“text/plain”).
Loading failed for the module with source “http://127.0.0.1:8080/assets/index-a80dcab2.js”.

@benjaminyzhang
Copy link

index-a80dcab2.js:1

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.

@869413421
Copy link
Owner

这似乎是一个前端兼容性问题

@869413421 869413421 added the bug Something isn't working label Mar 8, 2023
@869413421 869413421 self-assigned this Mar 8, 2023
@869413421 869413421 changed the title 页面空白 页面空白,页面报错 Mar 8, 2023
@869413421
Copy link
Owner

@rxliuli help

@rxliuli
Copy link
Contributor

rxliuli commented Mar 8, 2023

吾辈测试了 0.0.8 没发现问题,是已经解决了么?

@869413421
Copy link
Owner

吾辈测试了 0.0.8 没发现问题,是已经解决了么?

没有对前端文件做任何改动。😢

@rxliuli
Copy link
Contributor

rxliuli commented Mar 8, 2023

最后我将你的 <script type="module" crossorigin src="/assets/index-a80dcab2.js"></script > 中的 type 换成 defer 之后,页面就正常显示了,非常莫名其妙的问题

从这里的解决方法猜测是他的浏览器太旧了不支持 esmodule,或许试试最新的 chrome

@benjaminyzhang
Copy link

目前是最新的Edge和Firefox都是页面空白。

@3500024137
Copy link
Author

最后我将你的 <script type="module" crossorigin src="/assets/index-a80dcab2.js"></script > 中的 type 换成 defer 之后,页面就正常显示了,非常莫名其妙的问题

从这里的解决方法猜测是他的浏览器太旧了不支持 esmodule,或许试试最新的 chrome

不,我的浏览器都是最新的

@rxliuli
Copy link
Contributor

rxliuli commented Mar 9, 2023

  1. @869413421 需要服务端修改 mime type ref: https://stackoverflow.com/questions/59908927/failed-to-load-module-script-the-server-responded-with-a-non-javascript-mime-ty
  2. 或者修复用户系统注册表中缺失的 Computer\HKEY_CLASSES_ROOT.js,ref: https://caddy.community/t/failed-to-load-module-script/17408

@3500024137
Copy link
Author

新版本好像没啥变化,我依旧是空白

@laobanbiefangcu
Copy link

更新docker后,打开界面也是空白,不知道原因

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants