I'm getting the following error with dns during npm run build
in Dockerfile.
ModuleNotFoundError: Module not found: Error: Can't resolve 'dns' in '/reactProj/node_modules/ioredis/built/cluster'
dns is configured in the package.json to point to a mock file.
"dns": "file:./lib/__mocks__/dns",
What change should I be doing for this?
Dockerfile for ref:
FROM node:16
ENV NODE_ENV production
WORKDIR /reactProj
COPY ./package.json /reactProj
RUN npm install
COPY . .
RUN npm run build
Thanks in advance.