Gruntfuggly / mermaid-export

A vscode extension to wrap mermaid.cli in order to export mermaid diagrams to image files
15 stars 4 forks source link

not able to export (The system cannot find the path specified) #3

Open BenHizak opened 5 years ago

BenHizak commented 5 years ago
Mermaid Export ready
cwd:c:\Users\my_user_folder\repos\my_repo
command:c:\Users\my_user_folder\.vscode\extensions\gruntfuggly.mermaid-export-0.0.4/node_modules/.bin/mmdc -t default -i "c:\Users\my_user_folder\repos\my_repo\m1.mermaid" -o "c:\Users\my_user_folder\repos\my_repo\m1.png"
The system cannot find the path specified.

Possible Issues

mermaid-export version v0.0.4 - 2018-10-05 my system


Commit: 0dd516dd412d42323fc3464531b1c715d51c4c1a
Date: 2019-04-04T15:14:28.026Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.17763```
Gruntfuggly commented 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.

michalwa commented 5 years ago

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.

csbac commented 4 years ago

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"?

owenmurr commented 3 years ago

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

DmitriyBobrovskiy commented 3 years ago

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?

zioalex commented 2 years ago

Same problem with a Linux remote containers on Windows. None of the above workaround solved it.

Abhishekmitra-slg commented 6 months ago

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.