Closed bertdv closed 8 years ago
Please try to reinstall markdown-themeable-pdf
and check your firewall settings.
If the error is still up to date, write in this Ticket
I have the same issue using Atom 1.0.11 in Linux/Fedora 23. I tried to reinstall after disabled firewall, no success.
Strange, I have Fedora 23, too.
I also meet the same error, which tells me You have to set the path to the PhantomJS binary using 'options.phantomPath'
. I fix this error by using npm install html-pdf
in command prompt. Hope it works for you.
I'm using openSUSE Tumbleweed, after a long wait to install this package, and also have this problem. Re-installation doesn't do any help.
Sorry, but I can not do more than writing the package compliant :/ Unfortunately, the problems must be on your OS, Node, or atom installation
I am having the same problem on Windows10 64-bit, could anybody give some hint to fix it?
@yonglei I had the same problem just now on my Windows 10 64-bit machine. I managed to fix it following the instructions given by @Myasuka:
npm install html-pdf
Done. Phantomjs binary available at C:\Users\jonathan\node_modules\html-pdf\node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs.exe
This worked for me. I hope it works for you too.
@Myasuka @JonnyCBB I got the location of PhantomJS binary. May you please tell me how to 'Add the binary to your path'? Thank you so much.
Hey @bowang14, sorry for late reply. Assuming you're on a Windows machine here's how to add a binary to your path:
I hope this works for you :)
@JonnyCBB Thank you for your reply and I have to say sorry that I forgot to tell you I use a Mac. Thank you so much for your help all the same.
I found a way via Google and had already add it to my path. However, it doesn't work still.
[bogon:~ wangbo$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:**/Users/wangbo/node_modules/html-pdf/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs**:/Library/TeX/texbin
Is there any mistake I made?
Again thank you so much.
I have to admit that I know least about Macs.
What error message do you get? Is it the same as before?
Yes, exactly the same one.
@bowang14 I've been trying to reproduce the error but unfortunately I can't so I'm not quite sure what the problem is. Sorry :(
@JonnyCBB Thank you so so so much for your help all the same.
I made it by........just re-installing Atom. sigh
I'm glad that you got it working.
@JonnyCBB @bowang14 It works for me well and I maybe understand more about environment variables. Thank you.
我也遇到同样问题,根据以上评论,记录一下解决过程。 atom markdown转换PDF 解决AssertionError: html-pdf: Failed to load PhantomJS module http://blog.csdn.net/dream_an/article/details/51800523
I tried adding the PhantomJS binary to my environment path, but it doesn't work.
However, I fixed it by directly copy the html-pdf
folder created by npm install html-pdf
to ~/.atom/packages/markdown-themeable-pdf/node-modules
and overwrite the previous html-pdf
folder.
Well,I have the same problem and try to set the path manually.
Firstly,download the phantomjs:
npm install phantomjs
or
cnpm install phantomjs
and you will see
Done. Phantomjs binary available at C:\Users\Kael\AppData\Roaming\npm\node_modules\.phantomjs_npminstall\phantomjs\2.1.7\phantomjs\lib\phantom\bin\phantomjs.exe
copy the path and find this js file:
C:\Users\Kael\.atom\packages\markdown-pdf\node_modules\html-pdf\lib\PDF.js
paste the path and write:
this.options.phantomPath = "C:\\Users\\Kael\AppData\\Roaming\\npm\\node_modules\\.phantomjs_npminstall\\phantomjs\\2.1.7\\phantomjs\\lib\\phantom\\bin";
done.
ubuntu 16.04 Atom 1.9.2
sudo npm install -g phantomjs-prebuilt
Same problem here on ubuntu 16.04 Atom 1.12.05
At last, add a recommended procedure to install PhantomJs on the Readme file ? Because it's seems like to be a prerequisite for this package.
I don't use ubuntu so I can't say for certain that the procedure worked for me but I guess you submit this to the package author as a pull request.
It was really easy to fix on Linux:
markdown-themeable-pdf
package and close Atom.su
npm
(use your OS installer, whichever that may be, pacman
, zypper
, yum
, apt
, etc)npm install -g html-pdf
(this will make sure PhantomJS is correctly installed)markdown-themeable-pdf
packageThis worked for me without any issues, thanks for this amazing package @cakebake
On my macOS:
npm install -g phantomjs
markdown-themeable-pdf
@CharlSteynberg
uninstall markdown-themeable-pdf
and npm install -g html-pdf
.But there have not the button of Markdown to PDF
at the packages
of my Atom editor.@CharlSteynberg
@CharlSteynberg
markdown-pdf
and then is ok.Have the button and get PDF correctly ↖(▔▽▔)↗ @explosic4 原来是因为缺少包啊
我也遇到了这个问题,卸载后重启atom,然后重新安装,然后重启atom就可以用了
npm install -g html-pdf
npm install -g phantomjs
I dont know why, but using yarn instead of npm seems to solve my problem
[Enter steps to reproduce below:]
Atom Version: 1.0.19 System: Microsoft Windows 7 Enterprise Thrown From: markdown-themeable-pdf package, v0.10.1
Stack Trace
Uncaught AssertionError: html-pdf: Failed to load PhantomJS module. You have to set the path to the PhantomJS binary using 'options.phantomPath'
Commands
Config
Installed Packages