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

Unable to export to file since 1.1.4 #161

Open
piridium opened this issue Mar 28, 2024 · 15 comments
Open

Unable to export to file since 1.1.4 #161

piridium opened this issue Mar 28, 2024 · 15 comments

Comments

@piridium
Copy link

Since 1.1.4 I am unable to export files. This is the error message I get:

ENOENT: no such file or directory, stat 'extension-output-jebbs.markdown-extended-#1-MDExtended'
Error: ENOENT: no such file or directory, stat 'extension-output-jebbs.markdown-extended-#1-MDExtended'
    at statSync (node:fs:1692:3)
    at node:electron/js2c/node_init:2:4795
    at Object.n.statSync (/Users/max/.vscode/extensions/esbenp.prettier-vscode-10.4.0/dist/extension.js:1:3435)
    at getFileList (/Users/max/.vscode/extensions/jebbs.markdown-extended-1.1.4/out/src/services/exporter/export.js:27:48)
    at MarkdownExport (/Users/max/.vscode/extensions/jebbs.markdown-extended-1.1.4/out/src/services/exporter/export.js:10:24)
    at /Users/max/.vscode/extensions/jebbs.markdown-extended-1.1.4/out/src/commands/exportUri.js:20:48
    at v.d (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:150:151992)
    at v.withProgress (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:150:151855)
    at Object.withProgress (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:160:32751)
    at exportUri (/Users/max/.vscode/extensions/jebbs.markdown-extended-1.1.4/out/src/commands/exportUri.js:17:26)

I already tried to set puppeteer executable to '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' with no luck.

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: /Users/max/.cache/puppeteer).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.
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: /Users/max/.cache/puppeteer).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.
    at ChromeLauncher.resolveExecutablePath (/Users/max/.vscode/extensions/jebbs.markdown-extended-1.1.4/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:289:27)
    at ChromeLauncher.executablePath (/Users/max/.vscode/extensions/jebbs.markdown-extended-1.1.4/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:182:25)
    at PuppeteerNode.executablePath (/Users/max/.vscode/extensions/jebbs.markdown-extended-1.1.4/node_modules/puppeteer-core/lib/cjs/puppeteer/node/PuppeteerNode.js:156:105)
    at PuppeteerExporter.checkPuppeteerBinary (/Users/max/.vscode/extensions/jebbs.markdown-extended-1.1.4/out/src/services/exporter/puppeteer.js:81:79)
    at PuppeteerExporter.Export (/Users/max/.vscode/extensions/jebbs.markdown-extended-1.1.4/out/src/services/exporter/puppeteer.js:17:19)
    at MarkdownExport (/Users/max/.vscode/extensions/jebbs.markdown-extended-1.1.4/out/src/services/exporter/export.js:16:28)

I ran npm install inside ~/.vscode/extensions/jebbs.markdown-extended-1.1.4 which did not help either.
Rolling back to 1.1.3 everything works fine.

@piridium piridium changed the title Unable to export to file Unable to export to file since 1.1.4 Mar 28, 2024
@qjebbs
Copy link
Owner

qjebbs commented Mar 29, 2024

This is because your file to export is not saved, 1.1.3 should act the same way.

@piridium
Copy link
Author

No, this is not the case. The file is properly saved and I can export it with 1.1.3 but not with 1.1.4.
I also checked if there's any difference if I just open the file or open the containing folder as workspace. There is no difference in the behaviour.

@qjebbs
Copy link
Owner

qjebbs commented Mar 29, 2024

I can't reproduce it on my side

@0xD0M1M0
Copy link

0xD0M1M0 commented Apr 2, 2024

Can confirm the issue

@c4tom
Copy link

c4tom commented Apr 14, 2024

I have the same problem when I try to export to PDF

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/can/.cache/puppeteer).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.
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/can/.cache/puppeteer).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.
	at ChromeLauncher.resolveExecutablePath (/home/can/.vscode/extensions/jebbs.markdown-extended-1.1.4/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:289:27)
	at ChromeLauncher.executablePath (/home/can/.vscode/extensions/jebbs.markdown-extended-1.1.4/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:182:25)
	at PuppeteerNode.executablePath (/home/can/.vscode/extensions/jebbs.markdown-extended-1.1.4/node_modules/puppeteer-core/lib/cjs/puppeteer/node/PuppeteerNode.js:156:105)
	at PuppeteerExporter.checkPuppeteerBinary (/home/can/.vscode/extensions/jebbs.markdown-extended-1.1.4/out/src/services/exporter/puppeteer.js:81:79)
	at PuppeteerExporter.Export (/home/can/.vscode/extensions/jebbs.markdown-extended-1.1.4/out/src/services/exporter/puppeteer.js:17:19)
	at MarkdownExport (/home/can/.vscode/extensions/jebbs.markdown-extended-1.1.4/out/src/services/exporter/export.js:16:28)

cat /etc/os-release 
NAME="Linux Mint"
VERSION="21.3 (Virginia)"
ID=linuxmint
ID_LIKE="ubuntu debian"
PRETTY_NAME="Linux Mint 21.3"
VERSION_ID="21.3"
HOME_URL="https://www.linuxmint.com/"
SUPPORT_URL="https://forums.linuxmint.com/"
BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/"
PRIVACY_POLICY_URL="https://www.linuxmint.com/"
VERSION_CODENAME=virginia
UBUNTU_CODENAME=jammy

@atheerix
Copy link

atheerix commented May 2, 2024

I have the same problem too,
with Win 11 Pro and Mac OS

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: C:\Users\arix\.cache\puppeteer).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.
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: C:\Users\arix\.cache\puppeteer).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.
	at ChromeLauncher.resolveExecutablePath (c:\Users\arix\.vscode\extensions\jebbs.markdown-extended-1.1.4\node_modules\puppeteer-core\lib\cjs\puppeteer\node\ProductLauncher.js:289:27)
	at ChromeLauncher.executablePath (c:\Users\arix\.vscode\extensions\jebbs.markdown-extended-1.1.4\node_modules\puppeteer-core\lib\cjs\puppeteer\node\ChromeLauncher.js:182:25)
	at PuppeteerNode.executablePath (c:\Users\arix\.vscode\extensions\jebbs.markdown-extended-1.1.4\node_modules\puppeteer-core\lib\cjs\puppeteer\node\PuppeteerNode.js:156:105)
	at PuppeteerExporter.checkPuppeteerBinary (c:\Users\arix\.vscode\extensions\jebbs.markdown-extended-1.1.4\out\src\services\exporter\puppeteer.js:81:79)
	at PuppeteerExporter.Export (c:\Users\arix\.vscode\extensions\jebbs.markdown-extended-1.1.4\out\src\services\exporter\puppeteer.js:17:19)
	at MarkdownExport (c:\Users\arix\.vscode\extensions\jebbs.markdown-extended-1.1.4\out\src\services\exporter\export.js:16:28)

@gbougeniere
Copy link

Same problem here on a fresh windows install

@Sweefiez
Copy link

I had the same problem with version 1.1.4, but I switched to version 1.1.3 and it works fine for me. I'm running Windows 10

@dominotec
Copy link

I had the same problem with version 1.1.4 after vsCode update to version 1.19.0, but I switched to version 1.1.3 and it works. I'm running Windows 11.

@codewizard13
Copy link

I had the same problem with version 1.1.4 after vsCode update to version 1.19.0, but I switched to version 1.1.3 and it works. I'm running Windows 11.

Can you share the steps to downgrade plugin version?

@dominotec
Copy link

dominotec commented Nov 7, 2024

Steps to downgrade Markdown Extended Version

  • Open: vsCode
  • Open: vsCode Extension Manager (Key: Ctrl+Shift+X)
  • Search for: Markdown Extended
  • Select: Markdown Extended extension
  • Push the button Manage in the Markdown Extended extension
  • Select: Install Specific Version
  • Last: Reload the extension

Markdown_Extended_Downgrade_2024-11-07

@piridium
Copy link
Author

piridium commented Nov 7, 2024

It's been 8 months and we still don't have a fix for 1.1.4.
I use this extension almost every day and find it extremely handy. Thank you for the great work!
I'm afraid that some new users will encounter the same problem, realize that it doesn't work and then remove the extension without ever getting the hint to downgrade to 1.1.3.
Can you at least give us a tip from the error messages posted as to how we can start troubleshooting?

@Manu-Caminos
Copy link

Faced the same issue, but fortunately it was quite easy to fix, at least in my case. Steps I took (Windows 11):

  • Fresh installation of puppeteer (npm i puppeteer)
  • Puppeteer will install itself on something like c:/Users//.cache/puppeteer. I located chrome.exe there and copied the full path to it.
  • Edited markdown-extended settings and entered that path into 'Puppeteer executable'.

Now I can export my md files to pdf with version 1.1.4.

@dominotec
Copy link

Steps to Fix Markdown Extended Version 1.1.3 to Version 1.1.4 with Windows 10 and Windows 11

  • Windows command line: Open the Windows command line (press Win+R) as Administrator.

  • Windows command line: Check if Node.js/NPM is installed by running node -v and npm -v.

C:\Windows\System32>node -v Der Befehl "node" ist entweder falsch geschrieben oder konnte nicht gefunden werden.
C:\Windows\System32>npm -v Der Befehl "npm" ist entweder falsch geschrieben oder konnte nicht gefunden werden.

  • Windows command line: If you encounter errors when running node -v and npm -v, download the latest Node.js MSI package from https://nodejs.org/en.

2024-12-01-01

  • Node.js: Run the basic installation MSI package node-v22.11.0-x64.msi from your Downloads directory.

2024-12-01-02

  • Windows command line: Check if Node.js/NPM is installed by running node -v and npm -v. Example output: node -v = v22.11.0, npm -v = 10.9.0.

2024-12-01-03

  • Windows command line: Check if Puppeteer is installed by running npm list puppeteer. Output: [email protected]. Additional commands: npm uninstall puppeteer, npm install puppeteer, npm cache clean --force.

2024-12-01-04

  • Check Puppeteer directory/chrome.exe: Verify the directory at C:\Users\"your windows user account"\.cache\puppeteer\chrome\win64-131.0.6778.85\chrome-win64 (Check: chrome.exe).

2024-12-01-06

  • vsCode: In the Markdown Extended extension settings (@ext:jebbs.markdown-extended), set the correct path to Puppeteer chrome.exe (also modified in User/Workspace).

    Example: C:\Users\"your windows user account"\.cache\puppeteer\chrome\win64-131.0.6778.85\chrome-win64\chrome.exe

2024-12-01-05

  • vsCode: Update Markdown Extended extension from version 1.1.3 to 1.1.4.

2024-12-01-07

  • vsCode: Test Markdown Extended with Export to File. Output: 1 file(s) exported in 14.329 seconds: c:\temp\markdown\test.pdf - without errors Could not find Chromium (rev. 1108766)...

The Markdown Extended extension Version 1.1.4, Export to File is up and running with vsCode

Version: 1.95.3 (user setup)
Chromium: 128.0.6613.186
Node.js: 20.18.0

@piridium
Copy link
Author

piridium commented Dec 2, 2024

Thank you @Manu-Caminos and @dominotec, your contributions have helped me to fix the problem on macOS as well.
I didn't even have to install puppeteer using npm, I could just point the configuration to the already installed Chrome browser. I had already tried that several times, but I must have put the path in quotation marks which did not seem to work.

If I change the path to the puppeteer executable to /Applications/Google Chrome.app/Contents/MacOS/Google Chrome as in the example given - but without ', then the export works again.

How to get there:

  1. Press shift-cmd-P and type "open user settings"
  2. Navigate to "Extensions" and "Markdown Extended"
  3. Find the configuration for "Puppeteer Executable" and paste the path to your chrome executable.

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

10 participants