Skip to content
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

Error: ENOENT: no such file or directory, open 'd:\xx\Ljava\lang\String;' #181

Open
titanseason opened this issue Mar 1, 2020 · 6 comments
Milestone

Comments

@titanseason
Copy link

titanseason commented Mar 1, 2020

When I right click the .md file content, and select Markdown PDF: Export(pdf) or other menu items, I got these errors:

Error: ENOENT: no such file or directory, open 'd\xx\Ljava\lang\String;'

and

ERROR: convertMarkdownToHtml()

And the exported pdf or html is empty.

Extra Infos:

  1. The version of Markdown PDF: 1.4.2 (2020/02/16)
  2. The version of my OS: Windows 7 (Pro)
  3. The version of VSCode: 1.42.1
@yzane yzane added this to the 1.4.3 milestone Mar 11, 2020
@yzane
Copy link
Owner

yzane commented Mar 11, 2020

Please upgrade Markdown PDF to ver1.4.3 and try.

@alanwunsche
Copy link

Also seeing this error in VScode ver1.4.4

@tatleung
Copy link

I am also seeing the same issue on MacOS with M1 processor. The error message is:

Error: ENOENT: no such file or directory, open '.pdf/Users/...../lib/README_tmp.html'

@casualcontender
Copy link

I received the same error that there was no such file or directory ...tmp.html.

The cause was that I had saved the file, but it wasn't saved as markdown. There was no extension. I found the solution when I tried to use pandoc to convert the same file and it gave the error that it could not deduce format from file extension. Once I added .md to the filename, it converted with no errors.

tat3 pushed a commit to tat3/vscode-markdown-pdf-2 that referenced this issue Sep 4, 2022
@FrederikPabst
Copy link

FrederikPabst commented Oct 4, 2023

Got the same error today:

Error: ENOENT: no such file or directory, open 'DIRECTORY_WERE_MY_MARKDOWN_FILE_IS\https:\www.usb.org\compliance'

in combination with

convertMarkdownToHtml()

For me it was quite obvious to solve so here is the casue.
I had a header line as follows:

## 1.1. USB-IF:[Compliance](https://www.usb.org/compliance)

which leads to the error. When changing to (space after the colon!):

## 1.1. USB-IF: [Compliance](https://www.usb.org/compliance)

PDF export works flawless. Maybe this brings some insights.

Extra Infos:

The version of Markdown PDF: 1.5.0
The version of my OS: Windows 11 (Pro)
The version of VSCode: 1.80.1

@fukusuket
Copy link

If the regular expression below matches, it is treated as an include, so it seems that the cause is an attempt to reference a local file.

if (vscode.workspace.getConfiguration('markdown-pdf')['markdown-it-include']['enable']) {
md.use(require("markdown-it-include"), {
root: path.dirname(filename),
includeRe: /:\[.+\]\((.+\..+)\)/i
});
}

I tried to fix it in the PR #351

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants