Today, an exception occurred when converting markdown to PDF using atom’s mark themeable PDF plug-in: assertionerror: HTML PDF: failed to load phantom JS module. You have to set the path to the phantom JS binary using ‘options. Phantom path’
Paste the abnormal information into Baidu to search. After looking for more than an hour, I only found the solution under windows. The solution under Linux is not no, but it is either wrong or incomplete. Then I found it on stackoverflow, and I didn’t find the relevant information. I had to climb over the wall. Finally, I found a solution from GitHub with Google, which is aimed at Linux system.
Uninstall the markdown themeable PDF plug-in in atom and close atom.
Terminal input sudo apt get install nodejs
Terminal input sudo apt get install NPM
Input sudo NPM install – G HTML PDF at the terminal (this statement will ensure that phantom JS is installed correctly)
Open atom and reinstall the markdown themeable PDF plug-in
Finally, use the shortcut key Ctrl + Shift + e to perform the conversion. The successful effect is shown in the figure below