poweredbygt
poweredbygt

Reputation: 71

Uncaught Error: Cannot find module 'zlib'

So a docker image can be build but when running the service it can't render anything. Following is console error,

Uncaught Error: Cannot find module 'zlib' from 'mathml/app/MathML/MathMLRenderer.js'.

The dockerfile consists:

FROM node:8

RUN mkdir /opt/service
ADD . /opt/service
WORKDIR /opt/service
ENV HOME=/root

RUN npm install && npm dedupe
ENV IN_DOCKER=1

EXPOSE 4000
CMD npm start

Seems like a dependency is missing? Although I added zlib in dependencies in package.json

Upvotes: 1

Views: 3313

Answers (1)

Shekhar Tyagi
Shekhar Tyagi

Reputation: 1674

have you add the zib module, in the package.json using npm install zlib, after that when you do npm install, i guess it will works fine.

Upvotes: 1

Related Questions