installationchromiummermaid

Could not find Chromium (rev. 1108766). This can occur if either


I'm trying to install mermaid in my Ubuntu system for draw block diagram and state diagrams. I have followed all the steps as in this article (mermaid-installation). However, after installation, when I try to run mmdc on command I get the following error:

Error: Could not find Chromium (rev. 1108766). This can occur if either

  1. you did not perform an installation before running the script (e.g. npm install) or
  2. your cache path is incorrectly configured (which is: /home/sriram/.cache/puppeteer).

I found that there is no puppeteer in .cache directory.

Can someone help me how to fix this, as I'm not a software engineer and these new to me.

Thank you.


Solution

  • I had the same issue. I first thought puppeteer was the cause, but the issue seems to be linked to misconfiguration between global and local node environnements.

    I solved by installing mermaid-cli both globally and locally.

    First, install mermaid-cli globally with sudo npm -g install @mermaid-js/mermaid-cli. Check that npm -g list contains:

    /usr/lib
    ├── @mermaid-js/mermaid-cli@10.9.1
    

    Then, create a folder and install mermaid-cli locally:

    mkdir mermaid
    cd mermaid
    npm init (and follow setup)
    npm install @mermaid-js/mermaid-cli
    

    Check that npm list contains:

    mermaid@1.0.0 /home/gravlax/mermaid
    └── @mermaid-js/mermaid-cli@10.9.1
    

    PS: If you installed a package globally you can uninstall it with npm uninstall -g <package> --save