You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to install and run Mermaid in a light-weight Docker container running Ubuntu 20.04.
When interacting with the container and running mmdc, I'm receiving the following error originating from Puppeteer: UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
Full error: runtime_error.txt
From the package.json, Puppeteer is a dev dependency only. When installing Mermaid and Mermaid CLI using yarn add, I do not specify inclusion of development dependencies.
ARG MERMAID_VERSION="8.5.2"
ARG MERMAID_CLI_VERSION="8.5.1-2"
RUN yarn add mermaid@${MERMAID_VERSION} \
@mermaid-js/mermaid-cli@${MERMAID_CLI_VERSION}
The following entry is in the yarn.lock, which does not specify Puppeteer as a dependency:
I've tried adding the --prod or --production=true flags to to the yarn add, but mmdc still fails with the same issue. It seems the only way to avoid the error is to include all of the many Chromium dependencies that Puppeteer requires, and then it runs successfully.
Is there any way to avoid pulling in these dependencies just to run mmdc? I'm unfamiliar with yarn, so please let me know if I've missed something.
The text was updated successfully, but these errors were encountered:
@pb-seiso : thank you for your question. I have myself joined mermaid organization only recently (~5 months ago) and I am myself not an expert in TypeScript/Puppeteer area. I have had the same problem, when building official mermaid-cli docker image. You can have a look here: https://github.com/mermaid-js/mermaid-cli/blob/master/Dockerfile
Unfortunately, (to my understanding) the dependencies, you are talking about, are not for the mmdc itself: they are needed for the mermaid core library to run. Mermaid-cli is an extremely thin layer over mermaid, that does not really add new extra dependencies. So your initial attempt to post a question in the mermaid repository was the right place.
Just for your information, we do release mermaid-cli into the docker.com: https://hub.docker.com/r/minlag/mermaid-cli @knsv : please, comment on the issue above when you get the time.
I posted this question to the main
mermaid
repo two months ago without any response: mermaid-js/mermaid#1494Please let me know if the issue should remain there, or if this is the best place to handle it.
========================================================
I'm attempting to install and run Mermaid in a light-weight Docker container running Ubuntu 20.04.
When interacting with the container and running
mmdc
, I'm receiving the following error originating from Puppeteer:UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
Full error: runtime_error.txt
From the package.json, Puppeteer is a dev dependency only. When installing Mermaid and Mermaid CLI using
yarn add
, I do not specify inclusion of development dependencies.The following entry is in the
yarn.lock
, which does not specify Puppeteer as a dependency:I've tried adding the
--prod
or--production=true
flags to to theyarn add
, butmmdc
still fails with the same issue. It seems the only way to avoid the error is to include all of the many Chromium dependencies that Puppeteer requires, and then it runs successfully.Is there any way to avoid pulling in these dependencies just to run
mmdc
? I'm unfamiliar with yarn, so please let me know if I've missed something.The text was updated successfully, but these errors were encountered: