Closed seveibar closed 6 years ago
Resolved by reverting to 1.5.0
, that is, via npm install chrome-headless-render-pdf@1.5.0
My guess is this commit introduced the bug
Can you provide more details? How can I reproduce it?
npm init
npm install chrome-headless-render-pdf
chmod +x ./node_modules/chrome-headless-render-pdf/cli/chrome-headless-render-pdf.js
./node_modules/chrome-headless-render-pdf/cli/chrome-headless-render-pdf.js --url http://google.com --pdf out.pdf
Output:
Using google-chrome
Waiting for chrome to became available
Connected!
(node:4917) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Browser.getVersion is not a function
(node:4917) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Chrome version: Google Chrome 60.0.3112.78
Should be fixed in 1.6.0
Ps. executable version is installed in node_modules/.bin/
and it is also available in PATH in npm scripts.
Also you can execute it with yarn from command line: yarn chrome-headless-render-pdf
I'm on Arch Linux, installed via
npm install chrome-headless-render-pdf
. Command doesn't work programmically or via cli, I suspect this was introduced recently, because older versions work fine.