eva-engine / eva.js

Eva.js is a front-end game engine specifically for creating interactive game projects.
https://eva.js.org
MIT License
1.75k stars 108 forks source link

addComponent(new Event()) 报错 #62

Closed ipengkai closed 3 years ago

ipengkai commented 3 years ago

Expected Behavior

Current Behavior

image 代码:const evt = po.addComponent( new Event() ) 只要已执行这一句就会报错;

Possible Solution

Steps to Reproduce

Environment

fanmingfei commented 3 years ago

发生报错的原因是因为 Event 不是继承于 Component。 检查 Event 是否是 从 @eva/plugin-renderer-event 引入的 检查是否引用了相同的 @eva/eva.js, npm update 重装所有 node_modules 测试

ipengkai commented 3 years ago

卸载1.0.8,安装1.0.6版本就可以了。

fanmingfei commented 3 years ago

1.0.7版本都不行吗?你都用了哪些插件,可以看看你package.json么。