-
-
Notifications
You must be signed in to change notification settings - Fork 425
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:@blocksuite_presets.js?v=63b9b401:29619 Uncaught TypeError: Illegal constructor #8484
Comments
#8448 五天前已经有人提交过类似问题 尝试后发现新的问题 chunk-FQHTUMPG.js?v=7d56cc1f:1203 Uncaught TypeError: Cannot read properties of undefined (reading 'slots') |
请问出现该错误的复现代码是怎样的呢? |
import { blocksEffects(); import { Text } from "@blocksuite/store"; const editor = new AffineEditorContainer(); 我又按照官网的教程尝试了一遍,发现在不为editor添加doc的时候,才会出现这个报错,所以已经解决了,这其实不算一个bug |
related to #8393 |
#8393 (comment) this resolved the issue |
这是我的最小化代码
// index.html
<title>My Project</title> <script type="module" src="/script.js"></script>// script.js
import { AffineEditorContainer } from "@blocksuite/presets";
const root = document.getElementById("root");
const editor = new AffineEditorContainer();
root.innerHTML = "";
root.appendChild(editor);
报错如下:
@blocksuite_presets.js?v=63b9b401:29619 Uncaught TypeError: Illegal constructor
at new ReactiveElement (@blocksuite_presets.js?v=63b9b401:29619:5)
at new LitElement (@blocksuite_presets.js?v=63b9b401:31082:5)
at new _ShadowlessElement (@blocksuite_presets.js?v=63b9b401:48893:26)
at new DerivedClass (@blocksuite_presets.js?v=63b9b401:7668:7)
at new SignalWatcher2 (@blocksuite_presets.js?v=63b9b401:7507:3)
at new _a16 (@blocksuite_presets.js?v=63b9b401:197887:7)
at script.js:5:16
// package.json
{
"name": "blocksuite_bug",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"@blocksuite/blocks": "0.17.17",
"@blocksuite/presets": "0.17.17",
"@blocksuite/store": "0.17.17",
"vite": "^5.4.8",
"yjs": "^13.6.19"
}
}
这个问题是从"0.15.0-canary-202406291027-8aed732" 升级到latest版后出现的
包管理工具为yarn node版本v20.16.0
The text was updated successfully, but these errors were encountered: