It looks like you are using a Discourse version that doesn’t support .gjs format file.
I believe this was introduced in v3.2.0.beta3 (2023, July – specifically a this commit)
Unfortunately, unless someone would make a version without using .gjs file, you can either upgrade Discourse or uninstall the component.