-
Notifications
You must be signed in to change notification settings - Fork 413
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
[Bug]: Got SyntaxError & ReferenceError when Importing waline.js v3 by CDN | 通过CDN导入waline.js v3时得到语法错误与引用错误 #2483
Comments
Thank you for your solution. Waline can load now and without errors, including the errors I mentioned above. 感谢您的解答。现在Waline可以正常加载出来,不再出现我在上面提到的error或其他error。 |
不用更新文档,本质是 @waline/hexo-next 没有使用 ES Module 的加载方式 There is no need to update the document. The essence is that @waline/hexo-next does not use the ES Module loading method |
Thank you for your detailed explanation. |
不客气~ You're welcome~ |
@waline/hexo-next 需要更新一下么?我不是很熟悉hexo那边的东西 @waline/hexo-next Do you need to update it? I'm not very familiar with hexo stuff. |
@waline/hexo-next 我思考了下,暂时不更新了。主要有几点考虑:
@waline/hexo-next I thought about it and won’t update it for the time being. There are several main considerations:
|
问题描述 | Describe the bug
To import waline I use
@waline/hexo-next
npm package, which imports waline via CDN.I used to use waline v2 and was without the errors below.
Now I try to update to v3, changed in _config.next.yml like:
(The config before are marked as a comment.)
Deploy the website, visit and waline is gone. Nothing between
<div class="comments animated fadeIn" id="waline">
and</div>
.Use 'Inspect' to check and in Console tab shows these errors:
The statement near the position indicated by SyntaxError (in waline.js, line 71, col 20998) is like this (formatted by WebStorm):
It seems that this is exactly the statement that throws the SyntaxError.
However I have no clue to fix these errors after reading the docs carefully.
Both Firefox (version 125.0) and Chromium (version 122.0) throws these two errors.
我使用@waline/hexo-next包,此包通过CDN导入waline。
我之前使用waline v2,没有遇到下文说的error。
尝试更新到waline v3,我对_config.next.yml做出了以下改变:
(之前的配置以注释表示)
部署网站并访问后,发现waline评论区消失,
<div class="comments animated fadeIn" id="waline"><div>
之间没有内容。用开发者工具查看,在Console选项卡下发现了两个error:
其中SyntaxError显示的位置附近(waline.js,71行20998列)的代码如下(使用Webstorm格式化过):
报错的语句应当就是上面的这一句,但我仔细阅读过文档后,也没能找到修复以上错误的线索。
Firefox (版本125.0)和Chromium(版本122.0)的报错是吻合的。
问题网站 | Website URL
https://daiyu.host/2024/04/16/hello-world/
服务部署在哪里? | Where your waline deploy?
Vercel (Default)
数据存储在哪里?| Where your comment data store?
LeanCloud(https://leancloud.app)
The text was updated successfully, but these errors were encountered: