-
-
Notifications
You must be signed in to change notification settings - Fork 205
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/[email protected]/dist/. I reverted the version to [email protected] 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. |
I encountered the same issue today as @falettinsouls mentioned, and the following URL worked as expected (thank you very much!).
As far as I know, the latest stable release of Mermaid is 10.9.0. I also tried the following URL well. However, I couldn't generate a diagram with 10.9.0 (a PDF file was generated, but not with a diagram but with a source Markdown code as text).
I just wanted to update this discussion. |
Just to add to this thread, I found this issue too when my
Supported diagrams will correctly render (still not |
The default value for the mermaid server is
https://unpkg.com/mermaid/dist/mermaid.min.js
. This URL resolves tohttps://unpkg.com/[email protected]/dist/mermaid.min.js
and does not exist. There is ahttps://unpkg.com/[email protected]/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: