ScriptAsset “generator function missing” errors in exported .riv using Web JS runtimes
I created a script-heavy Rive project for a mini game. All scripts work as expected within the editor. However, after exporting the project and running it with any Web JS runtime, multiple scripts fail with console errors.
This issue occurs regardless of the script type (Path Effect Script, Node Script, or even simple/blank scripts).
Console Output:
webgl2@latest:786 ScriptAsset doesn't have a generator function RoundedRectWithSideHoles
webgl2@latest:786 ScriptAsset doesn't have a generator function PathToPolygonViewModel
webgl2@latest:786 ScriptAsset doesn't have a generator function GameLoopController
webgl2@latest:786 ScriptAsset doesn't have a generator function WorldScrollDriver
Additional Information / what i have tried for debugging:
Publishing via rive’s nativ Hosted Link also produces the same errors initially…
After removing unused script components in the project and republishing via Hosted Link, the errors disappeared.
However, exporting the same cleaned project as a .riv file and running it with standard Web JS runtimes still results in the same errors.
I’m currently unable to share the .riv file publicly, as the project is part of a client work that needs to remain private.
Has anyone else encountered similar “ScriptAsset doesn't have a generator function” errors when working with exported .riv files and Web JS runtimes?