Why does wick crash the first time you preveiw game

Whenever i open wick, the first time i run my project it will say that one of my classes are undefined,
then when i run it again it just works as intended.

I think that has something to do with why the game is frozen when i export it an html
flappyman10-8-2025_22-40-32.html (2.3 MB)