Closed RobertHue closed 1 year ago
I can reproduce with a nix shell :
{ pkgs ? import (builtins.fetchTarball {
url = "http://github.com/NixOS/nixpkgs/archive/91b77fe6942fe999b1efbe906dc98024d1917c0d.tar.gz";
sha256 = "041l46ccllbf9b94jxahw64zsjxs1368y4m5a5q2h41w82jjmdk1";
}) {},
shamilton ?
import (builtins.fetchTarball {
url = "http://github.com/SCOTT-HAMILTON/nur-packages-template/archive/1ed406b2ef43ffb71703e4ec4388692bbda40476.tar.gz";
sha256 = "1v8d6vg3d61jp7sh7va3s6v34lrxpczkdvad1hqadlwc05fw2cb8";
}) {}
}:
pkgs.mkShell {
buildInputs = with shamilton; [ mermaid-cli ];
shellHook = ''
cat << EOF | mmdc
sequenceDiagram
Tabbed Client 1->>+Alacritty Tab 1: Hello Alacritty, what's your X11 Window Identifier ?
Alacritty Tab 1-->>-Tabbed Client 1: Hi, my XID is 138412034.
EOF
'';
}
$ nix-shell
Output :
(node:19275) UnhandledPromiseRejectionWarning: Error: Evaluation failed: TypeError: Cannot read property 'initialize' of undefined
at __puppeteer_evaluation_script__:3:20
at ExecutionContext._evaluateInternal (/nix/store/c15qvj0ykw72vamn5lk9n4xhzai9568h-node_mermaid-cli-8.9.2/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:218:19)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async ExecutionContext.evaluate (/nix/store/c15qvj0ykw72vamn5lk9n4xhzai9568h-node_mermaid-cli-8.9.2/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:107:16)
at async ElementHandle.evaluate (/nix/store/c15qvj0ykw72vamn5lk9n4xhzai9568h-node_mermaid-cli-8.9.2/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer/lib/cjs/puppeteer/common/JSHandle.js:102:16)
at async ElementHandle.$eval (/nix/store/c15qvj0ykw72vamn5lk9n4xhzai9568h-node_mermaid-cli-8.9.2/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer/lib/cjs/puppeteer/common/JSHandle.js:650:24)
at async /nix/store/c15qvj0ykw72vamn5lk9n4xhzai9568h-node_mermaid-cli-8.9.2/lib/node_modules/@mermaid-js/mermaid-cli/index.js:130:18
(node:19275) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:19275) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Hi! I think this is posted in the wrong repo. The mermaid-cli project is here: https://github.com/mermaid-js/mermaid-cli Perhaps you can add an issue there refering to this one?
Hi! I think this is posted in the wrong repo. The mermaid-cli project is here: https://github.com/mermaid-js/mermaid-cli Perhaps you can add an issue there refering to this one?
An attempt has already been done here and the mermaid-cli guys said that they couldn't do much, it had to be something with mermaid itself.
OK, we will work together on it then.
just ran into this myself. my diagram is fairly long. should I post it here nonetheless?
Run into the same issue recently. As a temporary solution, you can adjust your puppeteer json file with these arguments:
{
"args": [
"--disable-gpu",
"--disable-dev-shm-usage",
"--disable-setuid-sandbox",
"--no-first-run",
"--no-sandbox",
"--no-zygote",
"--single-process"]
}
Tested on WSL2 Ubuntu 20.04 - fixed issue for me. Original solution: https://github.com/puppeteer/puppeteer/issues/1837#issuecomment-534075536
Hello! I'm experiencing the following issue:
Puppeteer und mermaid.cli are the latest version:
Version of
node
andnodejs
:This issue is related to: https://github.com/mermaid-js/mermaid/issues/662 I also already asked at https://github.com/mermaid-js/mermaid-cli/issues/70, but it turned out that mermaid-cli is just a thin-layer and I should address my question to the mermaid library. What could be the problem? Is this a bug or some configuration problem on my side?