ERROR: Failed to load script

Godot Version

4.6.3

Question

All project works fine in editor (games tarts, all functions worked).

But after export i get this…

Get error about my files (globals) and files which is marked as Object (used as static utility class)

ERROR: Failed to load script “res://common/global/event_bus.gd” with error “Compilation failed”.

This happens only after start project as .exe after exporting it.

Why this happens? Thank you very much!

Solved.

My inattention

Sorry to bother you but how did you end up fixing this?
This thread is the first result when trying to search this problem, it might be useful if there was something here for those of us still struggling.

If your utility classes (containing only static functions) access autoloads (global singletons) or global functions—or conversely, if autoloads call these static classes during initialization—then everything might work fine in the editor (or when running from the editor) but break in the exported build.

Something like that.