Giter VIP home page Giter VIP logo

Comments (23)

Sway007 avatar Sway007 commented on June 12, 2024 5

For Mac

brew install phantomjs

For Ubuntu

apt install phantomjs

then restart vscode, problem solved

from vscode-markdown-pdf.

nuomi1 avatar nuomi1 commented on June 12, 2024 4

For macOS 10.12 (brew was installed):

brew install phantomjs
cd ~/.vscode/extensions/yzane.markdown-pdf-0.1.4/node_modules/phantomjs-prebuilt
mkdir lib/phantom/bin
ln -s /usr/local/bin/phantomjs lib/phantom/bin/phantomjs

from vscode-markdown-pdf.

yzane avatar yzane commented on June 12, 2024 2

With the Internet connected, please open the markdown file with vscode.
Then phantomjs binary will be installed.

from vscode-markdown-pdf.

marsdotpset avatar marsdotpset commented on June 12, 2024 2

I got a same error after install when I used "Convert Markdown to PDF".

Error message is
ERROR: phantomjs binary does not exist: /Users/username/.vscode/extensions/yzane.markdown-pdf-0.1.7/node_modules/phantomjs-prebuilt/lib/phantom\bin\phantomjs.exe
The last two path separator are '\', not '/'.

I can found this exe file under the right path, but the default permissions of ~/.vscode/extensions/yzane.markdown-pdf-0.1.7/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs.exe
is -rw-r--r--, maybe it should be -rwxr-xr-x?

OS: OS X EI Caption
Markdown PDF: 0.1.7

from vscode-markdown-pdf.

peiyaoli avatar peiyaoli commented on June 12, 2024 2

I met the same issue as @marsdotpset ,
OS: ubuntu16.04
Markdown PDF:0.1.7

from vscode-markdown-pdf.

malk271 avatar malk271 commented on June 12, 2024 2

Simplest workaround for OSX users, at least, is to install Node.js (https://nodejs.org/en/), then go into the extensions directory and rebuild phantomjs:

cd $HOME/.vscode/extensions/yzane.markdown-pdf-0.1.7/node_modules/phantomjs-prebuilt
/usr/local/bin/node install.js

from vscode-markdown-pdf.

amiuhle avatar amiuhle commented on June 12, 2024 1

Having the same problem, got it working by symlinking the phantomjs binary:

mkdir -p ~/.vscode/extensions/yzane.markdown-pdf-0.1.4/node_modules/phantomjs-prebuilt/lib/phantom/bin
ln -s ~/.vscode/extensions/yzane.markdown-pdf-0.1.4/node_modules/phantomjs-prebuilt/bin/phantomjs  ~/.vscode/extensions/yzane.markdown-pdf-0.1.4/node_modules/phantomjs-prebuilt/lib/phantom/bin/

from vscode-markdown-pdf.

0tarof avatar 0tarof commented on June 12, 2024

I found same issue in my environment.

I got following error:

ERROR: phantomjs binary does not exist: /Users/USERNAME/.vscode/extensions/yzane.markdown-pdf-0.1.4/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs

but phantomjs pre-built binary is installed in:

/Users/USERNAME/.vscode/extensions/yzane.markdown-pdf-0.1.4/node_modules/phantomjs-prebuilt/bin/phantomjs

Please check again.

from vscode-markdown-pdf.

yzane avatar yzane commented on June 12, 2024

Thank you for your report.

The following file is not a binary file.

/Users/USERNAME/.vscode/extensions/yzane.markdown-pdf-0.1.4/node_modules/phantomjs-prebuilt/bin/phantomjs

Is there the following phantomjs binary file?

  • Windows
    • C:\Users\USERNAME\.vscode\extensions\yzane.markdown-pdf-0.1.4\node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs.exe
  • Linux
    • ~/.vscode/extensions/yzane.markdown-pdf-0.1.4/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs

from vscode-markdown-pdf.

applee avatar applee commented on June 12, 2024

If phantomjs is found in lib or on PATH, it will not be re-copied to dir ~/.vscode/extensions/yzane.markdown-pdf-0.1.4/node_modules/phantomjs-prebuilt/lib/phantom/bin. So I think you should just use ~/.vscode/extensions/yzane.markdown-pdf-0.1.4/node_modules/phantomjs-prebuilt/bin/phantomjs instead here, it will always work well.

from vscode-markdown-pdf.

adison avatar adison commented on June 12, 2024

With the Internet connected, please open the markdown file with vscode.
Then phantomjs binary will be installed.

--
This solution doesn't work for me.

from vscode-markdown-pdf.

eminsenay avatar eminsenay commented on June 12, 2024

I also had the same problem. Downloading the latest phantomjs and pasting the exe under C:\Users\USERNAME\.vscode\extensions\yzane.markdown-pdf-0.1.4\node_modules\phantomjs-prebuilt\lib\phantom\bin\ workaround solved it.

from vscode-markdown-pdf.

yzane avatar yzane commented on June 12, 2024

Thanks for report.
@applee I will check it.

from vscode-markdown-pdf.

yzane avatar yzane commented on June 12, 2024

Released 0.1.5 with this fix.
Please update!

from vscode-markdown-pdf.

eminsenay avatar eminsenay commented on June 12, 2024

Still getting the same error after uninstall/install:
ERROR: phantomjs binary does not exist: C:\Users[usernamehere].vscode\extensions\yzane.markdown-pdf-0.1.5\node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs.exe

from vscode-markdown-pdf.

yzane avatar yzane commented on June 12, 2024

@eminsenay Thanks for info.
Markdown-pdf will automatically download phantomjs.
In version 0.1.4, if phantomjs were found in PATH, an error occurred.
This problem was fixed in version 0.1.5.
However, it seems that an error has occurred due to other causes.

With this fix, if phantomjs is found in PATH it will be used.
Therefore, if an error occurs, please download and install phantomjs from here and set it to PATH.

from vscode-markdown-pdf.

Amroll avatar Amroll commented on June 12, 2024

I got a same error after install when I used "Convert Markdown to PDF". but when I install Node.js and reload this ext. This error is fixed.
So, I think here maybe has some problem.

Another method to resolve this error(just windows):

  1. Download phantomjs from here
  2. Extract (unzip) the content and copy the bin folder to

C:\Users[usernamehere].vscode\extensions\yzane.markdown-pdf-0.1.5\node_modules\phantomjs-prebuilt\lib\phantom

  1. Restart vscode.

from vscode-markdown-pdf.

deadlydog avatar deadlydog commented on June 12, 2024

Same problem for me as well

ERROR: phantomjs binary does not exist: C:\Users\USERNAME\.vscode\extensions\yzane.markdown-pdf-0.1.6\node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs.exe

What's weird is the file does exist at that location though. After doing the steps above of manually downloading and overwriting that file, then it works as expected.

from vscode-markdown-pdf.

andyrdavidson avatar andyrdavidson commented on June 12, 2024

Same problem for me as well. @Amroll solution works for me. Like @deadlydog the file already existed at the appropriate location.

from vscode-markdown-pdf.

yzane avatar yzane commented on June 12, 2024

Since the size limit of the extensions increased from 20 MB to 100 MB, we included phantomjs.exe for Windows in Markdown-PDF 0.1.7.
Increase Extension Size Limit

from vscode-markdown-pdf.

malk271 avatar malk271 commented on June 12, 2024

Same issue on MacOSX. The pre-build phantomjs.exe executable is a Windows binary. Not usable by OSX or Linux.

from vscode-markdown-pdf.

angelok1 avatar angelok1 commented on June 12, 2024

@malk271's rebuilding phantomjs suggestion worked for me on high sierra.

from vscode-markdown-pdf.

yzane avatar yzane commented on June 12, 2024

Markdown PDF ver1.0.0 replaced PDF converter with puppeteer instead of node-html-pdf.
Therefore PhantomJS is no longer used.

from vscode-markdown-pdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.