Open bilashcse opened 7 years ago
The readme explains the usage in pretty good detail. I suggest you read that first and then comment here again if you have issues using the CLI.
I have read the doc already & worked on Linux successfully. But Now need to install this on mac os. What will be the alternative solution for :
For gnu/linux installations without a graphical environment: $ sudo apt-get install xvfb # or equivalent $ export DISPLAY=':99.0' $ Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & $ electron-pdf ...
It should be exactly the same (npm install -g electron-pdf
), minus the display. There was one other mac related ticket https://github.com/fraserxu/electron-pdf/issues/126 but I have never been able to reproduce that error.
I have installed electron-pdf but what will be the alternative solution for
For gnu/linux installations without a graphical environment: $ sudo apt-get install xvfb # or equivalent $ export DISPLAY=':99.0' $ Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & $ electron-pdf ...
And after install electron-pdf on mac, when just write electron-pdf & hit enter error occurred:
/usr/local/lib/node_modules/electron-pdf/node_modules/electron/index.js:9 throw new Error('Electron failed to install correctly, please delete node_modules/' + path.basename(__dirname) + ' and try installing again') ^
Error: Electron failed to install correctly, please delete node_modules/electron and try installing again
at Object.
From the error you might have an error while downloading electron(which is not a small file), can you try to run install it again? It may fix the issue as this is a quite common error for people install electron.
I want to install electron-pdf on mac. How can I do this ?