If you got that error, it's probably due to a broken Minecraft instance, broken mod loader or a bad mod launcher.
It normally shows when FancyMenu got modified, but it can also show if your game fails to correctly load mods like it's supposed to.
This can be due to your Minecraft instance being broken in some way, which should make your reinstall your game.
Another possible cause for the error is when your game semi-crashes on launch because some mods (including FancyMenu) failed to load properly. In that case please post your /logs/latest.log
file in the Discord server or open an issue on GitHub.
The error can also be triggered due to using a bad mod launcher (most cracked/pirate launchers trigger the bug, so please buy the game). Recommended launchers that are stable and work great with FancyMenu are the official CurseForge launcher and the official Modrinth launcher.