npm run build 抛出错误“属性‘加载’受到保护,只能在‘AnimationState’类及其子类中访问”

问题描述

我正在尝试运行此存储库 - https://github.com/alexeychikk/happy-birthday-orly。 它使用 Phaser3、节点、打字稿和 AngularJS。 虽然“npm start”在本地主机中工作正常,但当我尝试“npm run build”时出现错误,它会引发以下错误

ERROR in /home/wm0609/git_files/anu/happy-birthday-orly/src/components/Doors.ts(110,18)
  TS2445: Property 'load' is protected and only accessible within class 'AnimationState' and its subclasses.

ERROR in /home/wm0609/git_files/anu/happy-birthday-orly/src/components/LevelMap.ts(75,19)
  TS2352: Conversion of type 'Tiledobject[]' to type 'LevelObject[]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional,convert the expression to 'unkNown' first.Type 'Tiledobject' is not comparable to type 'LevelObject'.
    Type 'Tiledobject' is missing the following properties from type 'GameObject': scene,displayList,state,parentContainer,and 41 more.

ERROR in /home/wm0609/git_files/anu/happy-birthday-orly/src/components/Doors.ts(121,17)
  TS2540: Cannot assign to 'height' because it is a read-only property.

错误 1 ​​

enter image description here

错误 2

enter image description here

我尝试在 heroku/netlify 上托管它,但同样的问题。 感谢您的帮助!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)