Open BenHizak opened 5 years ago
I'm not sure why it's not installing itself under windows.
In the short term (assuming you have node.js installed), if you go to
C:\Users\my_user_folder\.vscode\extensions\gruntfuggly.mermaid-export-0.0.4
and then do
npm install mermaid.cli
you should hopefully end up with the binaries in the .bin folder.
Let me know if it works.
For me running npm install mermaid.cli
in the extension directory seems to have resolved the former issue but now I get this error:
cwd:(my project directory)
command:c:\Users\(my username)\.vscode\extensions\gruntfuggly.mermaid-export-0.0.6/node_modules/.bin/mmdc -t dark -i "(my project directory)\mermaid-test.mmd" -o "(my project directory)\mermaid-test.png"
(node:6932) UnhandledPromiseRejectionWarning: Error: Chromium revision is not downloaded. Run "npm install" or "yarn install"
at Launcher.launch (c:\Users\(my username)\.vscode\extensions\gruntfuggly.mermaid-export-0.0.6\node_modules\puppeteer\lib\Launcher.js:119:15)
at <anonymous>
(node:6932) 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(). (rejection id: 1)
(node:6932) [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.
Running just npm install
in the extension directory doesn't resolve the issue.
Update: Manually resolved by installing npm install puppeteer
in the extension directory. Puppeteer needs to download chromium locally.
Just a guess: the OS is not correctly recognized under vscode/npm. I removed the node_modules directory from the plugin dir, and called "npm install" (Linux, Ubuntu Bionic, x64), and now it works. Before, the bin/ files (including mermaid.cli/bin/mermaid.js and .bin/mmdc) were missing, now they are there. Does vscode use its own npm that does not work with anything "bin"?
For me running
npm install mermaid.cli
in the extension directory seems to have resolved the former issue but now I get this error:cwd:(my project directory) command:c:\Users\(my username)\.vscode\extensions\gruntfuggly.mermaid-export-0.0.6/node_modules/.bin/mmdc -t dark -i "(my project directory)\mermaid-test.mmd" -o "(my project directory)\mermaid-test.png" (node:6932) UnhandledPromiseRejectionWarning: Error: Chromium revision is not downloaded. Run "npm install" or "yarn install" at Launcher.launch (c:\Users\(my username)\.vscode\extensions\gruntfuggly.mermaid-export-0.0.6\node_modules\puppeteer\lib\Launcher.js:119:15) at <anonymous> (node:6932) 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(). (rejection id: 1) (node:6932) [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.
Running just
npm install
in the extension directory doesn't resolve the issue.Update: Manually resolved by installing
npm install pupeteer
in the extension directory. Pupeteer needs to download chromium locally.
Just a quick edit, you missed spelled puppeteer - npm install puppeteer
I had the same error as topic starter but then I called npm install mermaid.cli
inside the extension directory and started getting message:
cwd:c:\Users\DmitriiBobrovskii\Documents\Work command:c:\Users\DmitriiBobrovskii.vscode\extensions\gruntfuggly.mermaid-export-0.0.8/node_modules/.bin/mmdc -t default -i "c:\Users\DmitriiBobrovskii\Documents\Work\Billing_Sequence_Diagram.md" -o "c:\Users\DmitriiBobrovskii\Documents\Work\Billing_Sequence_Diagram.png" '"node"' is not recognized as an internal or external command, operable program or batch file. OK
I tried calling this command manually inside bash, but with fixes of slashes:
c:\Users\DmitriiBobrovskii\.vscode\extensions\gruntfuggly.mermaid-export-0.0.8\node_modules\.bin\mmdc -t default -i "extension-output-Gruntfuggly.mermaid-export-#1" -o "extension-output-Gruntfuggly.png"
output:
bash: c:UsersDmitriiBobrovskii.vscodeextensionsgruntfuggly.mermaid-export-0.0.8node_modules.binmmdc: command not found
and inside PowerShell with same fixes:
c:\Users\DmitriiBobrovskii\.vscode\extensions\gruntfuggly.mermaid-export-0.0.8\node_modules\.bin\mmdc -t default -i "c:\Users\DmitriiBobrovskii\Documents\Work\Billing_Sequence_Diagram.md" -o "c:\Users\DmitriiBobrovskii\Documents\Work\Billing_Sequence_Diagram.png"
and in psh it doesn't write anything to console like it did it's job, though the image isn't saved to output path.
Also I tried calling npm install puppeteer
inside the extension folder - that didn't help either.
Any ideas, guys?
Same problem with a Linux remote containers on Windows. None of the above workaround solved it.
I am facing the same problem on Mac OS (with M1) as well. I downloaded the latest version of this extension but I see that the issue is not resolved yet. Any idea how to get it working?
As a workaround I have installed mermaid cli separately as stand-alone and using it without any issues.
Possible Issues
C:\Users\my_user_folder\.vscode\extensions\gruntfuggly.mermaid-export-0.0.4\node_modules
exists but there is no.bin
subfolder insidemermaid-export version
v0.0.4 - 2018-10-05
my system