Docker container not starting after rebuilding

I’m working on a project where I start all the services needed using what is essentially a docker-compose script (./ Line 24). This docker-compose command uses a YAML file (./pre-built.yml). Everything starts correctly by default. This includes the voter frontend I’m having trouble with later on:

$ docker ps | grep voter

But when I create a voter frontend image using ./voter-frontend/ using the same code that created the original image, it doesn’t start when I replace it
with in the YAML file (docker ps | grep voter produces no result unlike before). Why is this the case?

Also, running the default image yields:

$ docker run
ERROR: Unknown or unexpected option: -d -s build -l tcp://

And running my modified one yields:

$ docker run
      const ipAddress = request.socket.remoteAddress?.replace("::ffff:", "") ?? "unknown";
SyntaxError: Unexpected token '.'
    at Loader.moduleStrategy (internal/modules/esm/translators.js:140:18)
    at async link (internal/modules/esm/module_job.js:42:21)

That is to say, I don’t know how to run either with just docker run.

You can run my code by cloning my repository (linked in the
first sentence of this post), checking out the prebuilt branch and running ./ after setting up the prerequisites in the README.

Please do not just reference a link here. Its content can neither be indexed by the forum search, nor is there a guarantee the link will remain forever valid.

Furthermore, it will raise the chance that actually someone will look at it.

I posted the contents from the Stack Overflow question here. But as a new user, it only allowed me to post 2 links, so I had to remove a lot of the links which might have been helpful.