mermaid.cli icon indicating copy to clipboard operation
mermaid.cli copied to clipboard

Install on Windows

Open Stephanevg opened this issue 5 years ago • 5 comments

Hi all, Is it possible to install it on windows? (yarn and npm are repositories not available by default on Windows systems).

Can you guys let me know how I can get it on a Windows system? (like, via a downloadable MSI file for example?)

Stephanevg avatar Nov 29 '19 15:11 Stephanevg

It should be possible to install Node.js which would allow using npm (Node Package Manager). Once Node.js is installed and added to path - it would be possible to install mermaid.cli globally by executing: npm install -g mermaid.cli Once that is done, one can now use mmdc command as in readme

unkish avatar Dec 13 '19 18:12 unkish

Hi @unkish

Thanks for the answer. I was trying to find a way to bundle mermaid into another project. I was trying to fnid a very simple an non intrusive way to do so.

Wouldn't it be possible to make mermaid.cli available via a 'smiple' download source button? I would like to integrate mermaid in a framework I am currently building which works on Windows platform. I would like to limit the dependecies that the end users will have to a very minimum. So asking them to install node etc.. seems a bit overkill.

Plus, I would like to be able to update easily the version of mermaidjs without having to go through a bunch of installs. Bootstrap and other similar tools have some that option available already, and that is how I get the sources I need. Would it be possible to do something in that direction?

Stephanevg avatar Jan 17 '20 08:01 Stephanevg

Or perhaps even just the 'Release' tab here on Github to do the trick (If it contains stuff ready to use)

Stephanevg avatar Jan 17 '20 08:01 Stephanevg

Indeed npm install -g mermaid.cli did the trick for me. Maybe the readme could mention it as an installation path for windows

holgerbrandl avatar Jul 08 '21 19:07 holgerbrandl

Addendum: Having no clue about npm, I run into the problem that the mentioned command installed a very old version. Not sure why. But after checking out the repo and running npm install -g @mermaid-js/mermaid-cli in the working copy root, it seemed to have installed the latest and greatest, which works smoothly.

holgerbrandl avatar Jul 08 '21 20:07 holgerbrandl

All Windows comes with Edge, which is chromium, and supports javascript just as well as node. There technically should be a way to have an "executable" named mmdc that just calls an edge process, takes the same command line options and feeds it to a checked-out version of mermaid.js and it's dependencies, all without internet access, and could be packaged as an msi or similar. My only issue, is that I'm not a npm/node guru, so I don't have the ability to do something similar myself.

Does npm already have a way to capture a package and all its dependencies into a single tarball, because I suspect that would be step one, with step 2 being wrapping the funcitonality into a native windows cli that uses edge, instead of relying on node and npm and an internet connection.

ExeVirus avatar Oct 21 '22 11:10 ExeVirus

Development has moved to the https://github.com/mermaid-js/mermaid-cli repo, please re-open your issue there if it's still relevant. The package has also been renamed on NPM to @mermaid-js/mermaid-cli, so you may need to run npm uninstall mermaid.cli && npm install @mermaid-js/mermaid-cli to get the latest version of this package.

Wouldn't it be possible to make mermaid.cli available via a 'smiple' download source button?

There is some discussion about making a single-file .exe file for Windows in https://github.com/mermaid-js/mermaid-cli/issues/467. The summary is, it's probably possible, but it will take quite a bit of work, and the current maintainers of @mermaid-js/mermaid-cli don't know Windows well, so it would need a Windows expert to make a PR.

aloisklink avatar Jul 21 '23 23:07 aloisklink