Custom validation and 500 error in docker?

In Discord, user Daedalus suggested I don’t copy the package-lock.json file to docker, so it may be that different dependencies versions are being used locally and in docker images. I was able to replicate this after clearing the project (deleted .cache, node_modules, dist folders package-lock.json fille) and after building locally was behaving this way too. So maybe some newer dependency could have caused it.

I added package-lock.json to Dockerfile and it worked well.