vscode markdown pdf无法启动Chrome

时间:2019-02-27 13:14:14

标签: visual-studio-code puppeteer

我在vscode中使用以下扩展。 https://marketplace.visualstudio.com/items?itemName=yzane.markdown-pdf

我已经安装了它。我右键单击我的readme.md文件,然后选择Markdown pdf:export(pdf)。

当我这样做时,出现以下错误。

>    Error: Failed to launch chrome! dlopen
> /Users/MyCompName/.vscode/extensions/yzane.markdown-pdf-1.2.0/node_modules/puppeteer/.local-chromium/mac-549031/chrome-mac/Chromium.app/Contents/MacOS/../Versions/67.0.3391.0/Chromium
> Framework.framework/Chromium Framework:
> dlopen(/Users/MyCompName/.vscode/extensions/yzane.markdown-pdf-1.2.0/node_modules/puppeteer/.local-chromium/mac-549031/chrome-mac/Chromium.app/Contents/MacOS/../Versions/67.0.3391.0/Chromium
> Framework.framework/Chromium Framework, 261): image not found
> TROUBLESHOOTING:
> https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md

1 个答案:

答案 0 :(得分:0)

将vscode配置设置为"markdown-pdf.executablePath": "/opt/google/chrome/chrome"而不是chrome-sandbox