New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Markdown-pdf: Mermaid Server VSCode URL no longer resolves #312
Comments
You can load the previous Version of Mermaid, by Entering this: |
Just noticed, you posted the fix already. Sorry! |
As @ajoseps suspected, in this mermaid issue they say:
I tried setting |
...but I managed to solve them on my own somehow. Since I don't have the ability to contribute to the development of this useful program, I hope that the developers can modify it to reference the working js file as the default when this program is installed. Alternatively, I would appreciate it if the "Issue" section at the bottom of the program description could explicitly mention that this issue exists. |
On April 15th, 2023, I also encountered a similar issue. Mermaid was not properly exported as a PDF, and I discovered that the cause was a failure in CDN reference. When I visited UNPKG in browser mode, I found that the mermaid.min.js that should have been referenced as default setting was missing from https://unpkg.com/browse/mermaid@10.1.0/dist/. I reverted the version to mermaid@10.0.3-alpha.1 and applied the mermaid.min.js located there. However, since "/browse/" did not provide the appropriate directory specification, I had to replace it with the following URL:
Finally, Markdown PDF can now successfully convert Mermaid diagrams to PDF. I was plagued by various minor issues such as
...but I managed to solve them on my own somehow. Since I don't have the ability to contribute to the development of this useful program, I hope that the developers can modify it to reference the working js file as the default when this program is installed. Alternatively, I would appreciate it if the "Issue" section at the bottom of the program description could explicitly mention that this issue exists. |
The default value for the mermaid server is
https://unpkg.com/mermaid/dist/mermaid.min.js
. This URL resolves tohttps://unpkg.com/mermaid@10.0.0/dist/mermaid.min.js
and does not exist. There is ahttps://unpkg.com/mermaid@9.0.0/dist/mermaid.min.js
that exists (and works), but it seems like going forward mermaid is using a different format.The following files exist for
10.0.0
:mermaid.core.mjs
mermaid.core.mjs.map
mermaid.d.ts
mermaid.esm.min.mjs
mermaid.esm.min.mjs.map
mermaid.esm.mjs
mermaid.esm.mjs.map
mermaid.spec.d.ts
I tried replacing the URL with the
mermaid.esm.min.mjs
but that did not work. I'm not a web developer so I'm not sure if it is as simple as replacing the URL with one that points to one of these files.The text was updated successfully, but these errors were encountered: