Closed yolanv closed 6 years ago
I've got the same problem. Using it on a Windows machine with npm.
Hi @yolanv @qn0x!
Sorry for the inconvenience.
Could you please let me know what versions of node
, npm
and yarn
you are using?
Thank you in advance.
Hi @yolanv @qn0x!
Could you please update the package yarn global upgrade @wishtack/gitbook-printer
or npm update -g @wishtack/gitbook-printer
?
I just released a new version to make it compatible with more NodeJS versions.
Hey, sorry for the late answer.
The previous error is now gone, but getting a new stack trace. Running on Node v8.11.1 and npm 5.6.0
[admin@localhost ~]$ gitbook-printer --base-url gitbook-book-url --summary-path ./SUMMARY.md Error: Failed to launch chrome! [0606/091414.479254:ERROR:icu_util.cc(133)] Invalid file descriptor to ICU data received. [0606/091414.482338:FATAL:content_main_delegate.cc(57)] Check failed: false.
0 0x55ee4ee1782c base::debug::StackTrace::StackTrace()
1 0x55ee4ed9e290 logging::LogMessage::~LogMessage()
2 0x55ee4d04ede3 content::ContentMainDelegate::TerminateForFatalInitializationError()
3 0x55ee4eacd941 content::ContentMainRunnerImpl::Initialize()
4 0x55ee4ead7c12 service_manager::Main()
5 0x55ee4eacc184 content::ContentMain()
6 0x55ee52ca4a39 headless::(anonymous namespace)::RunContentMain()
7 0x55ee52ca4ac2 headless::HeadlessBrowserMain()
8 0x55ee4ead4f8f headless::HeadlessShellMain()
9 0x55ee4d04d1ac ChromeMain
10 0x7f30c418e18b __libc_start_main
11 0x55ee4d04d02a _start
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/usr/lib/node_modules/@wishtack/gitbook-printer/node_modules/puppeteer/lib/Launcher.js:255:14) at Interface.helper.addEventListener (/usr/lib/node_modules/@wishtack/gitbook-printer/node_modules/puppeteer/lib/Launcher.js:244:50) at emitNone (events.js:111:20) at Interface.emit (events.js:208:7) at Interface.close (readline.js:370:8) at Socket.onend (readline.js:149:10) at emitNone (events.js:111:20) at Socket.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at _combinedTickCallback (internal/process/next_tick.js:138:11)
Hey @yjaaidi, sorry for the late reply.
I just updated the package and am getting a different error than before.
Running Node v6.11.4 and npm v3.10.10 on a Win10 machine. I'll might update my node and npm later
C:\Users\qn0x>gitbook-printer` --base-url https://xxx.xxx/xxx --summary-path ./SUMMARY.md
C:\Users\qn0x\AppData\Roaming\npm\node_modules\@wishtack\gitbook-printer\index.js:28
async savePdf() {
^^^^^^^
SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:383:7)
at startup (bootstrap_node.js:149:9)
Sorry! gitbook-printer
only works with Node 8 or higher (due to the usage of async / await
).
Thank you.
Aw shoots. I'll update my Node version then. Thanks!
@qn0x let us know if it worked for you. Thanks.
When I type 'gitbook-printer', it gives me:
/usr/bin/env: ‘node --experimental-modules’: No such file or directory
Tried on two machines, both same results. Tried installing with both yarn & npm.
Thanks!