Docker compose up seems to work, but node server is returning error (function(a_, b_) { with (a_) with (b_) return closeDescriptionPopup })

I have these docker compose configs and launch using the command docker compose up -d --build. But when I go to the url http://localhost:8000 I get the shown error from chrome. I can also see my node server is up with the standard message listening at port 8000

// Dockerfile

FROM node:18
WORKDIR /usr/src/app
COPY ["package.json", "package-lock.json", "tsconfig.json", "./"]
COPY ./src ./src
RUN npm install
CMD npm run build:start # build:start builds and then starts the server

// docker-compose.yml

version: "3.4"

    image: chatterserver
    build: .
      NODE_ENV: development
      - 8000:8000
      - db
      - .:/usr/src/app
    image: postgres:14-alpine
      POSTGRES_USER: dechat
      POSTGRES_DB: dechat
      - 5432:5432
      - ./dbdata:/var/lib/postgresql/data

Can you share a simple demo with all the files that we can actually try? The “returning error” doesn’t seem to be an error but a part of a javascript code. If you get that in a web browser nodejs doesn’t interpret the code correctly. I am not a nodejs developer so without having a code that I could try I could only guess and when it comes to nodejs it would probably be a bad guess, not a really good one.

Have you tried to the code on the host outside the container? If that worked, run docker exec -it CONTAINER_NAME sh and check make sure that all the files are inside the container.

Hello @jsoneaday

@rimelek rightly said , this is possible javascript error.
if you could please share sample package.json and sample HTML,TS file s that we can reproduce.