Node js Microservice error in docker container

Hi all I am facing issue in Node js Microservices
Error in express-http-proxy
TypeError: next is not a function this is the error I am facing in docker container. I didn’t Know how to solve this error. Please Help me.

If you expect any help, you should give us more information, since we have no idea what you are trying to do. The fact that you get this error in a container, does not mean that it is caused by Docker.

Please find the Below error. I Have apigateway microservice. I will run locally the Microservice working properly. But once I will create docker container I try login I have below error. How to resolve this

default: { next(err); }

TypeError: next is not a function
at handleProxyErrors (/usr/src/app/node_modules/express-http-proxy/app/steps/handleProxyErrors.js:17:27)
at /usr/src/app/node_modules/express-http-proxy/index.js:54:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.7.0

It is still not enough information. The error message is a NodeJS error. Try to find when that error can hapen in NodeJS, so what is missing from the container. Run an interactive container and install/configure everything there instead of using nodejs as an entrypoint or command in your container. That way you can find out what is in the container as if you were working in a virtual machine.

docker run --rm -it IMAGENAME bash

If bash doesn’t exist in the container, try an other shell, like “sh”.

Make sure you choose the right image for your container containing the right version of NodeJS.