decktape: Install error with Node 13
Have already ran npm rebuild
and npm install
as suggested but no help.
$ npm install -g decktape
/usr/local/bin/decktape -> /usr/local/lib/node_modules/decktape/decktape.js
+ decktape@2.10.0
updated 67 packages in 1.768s
$ decktape --chrome-arg=--allow-file-access-from-files --chrome-arg=--disable-web-security remark kubernetes_xtradbcluster.html ~/Desktop/kubernetes_xtradbcluster_20191214.pdf
internal/modules/cjs/loader.js:1190
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: The module '/usr/local/lib/node_modules/decktape/node_modules/hummus/binding/hummus.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 59. This version of Node.js requires
NODE_MODULE_VERSION 79. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1190:18)
at Module.load (internal/modules/cjs/loader.js:976:32)
at Function.Module._load (internal/modules/cjs/loader.js:884:14)
at Module.require (internal/modules/cjs/loader.js:1016:19)
at require (internal/modules/cjs/helpers.js:69:18)
at Object.<anonymous> (/usr/local/lib/node_modules/decktape/node_modules/hummus/hummus.js:5:31)
at Module._compile (internal/modules/cjs/loader.js:1121:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1160:10)
at Module.load (internal/modules/cjs/loader.js:976:32)
at Function.Module._load (internal/modules/cjs/loader.js:884:14)
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 7
- Comments: 21 (13 by maintainers)
Version 3.0.0 has just been released that contains cc7f2fbc342c667ab916e12c3c4cdc9fe1a43499. Let me close this.
I’ve started experimenting with
pdf-lib
. I’m still working on reaching the same level of functionality, but it seems a very promising candidate. I’ll keep you posted ASAP.@firasm Thanks. I also recommend NVM. I get your pain. This is the most important outstanding issue, so I’ll try to work on it ASAP.
Just to provide some instructions for anyone that comes here trying to install decktape on macOS (I’m on 10.15.4) and facing install problems, here’s what I did:
nvm install 12.14.1
(note the version of node@12 on brew is 12.16, and it does not work)What a pain! I hope the HummusJS dependency gets removed soon, thanks for working on it and this package!
This should be fixed with cc7f2fbc342c667ab916e12c3c4cdc9fe1a43499. No more native module 🥳!
I’ve done some testing and it works on all the examples. I’ll cut a new release ASAP.
Wow, thank you @firasm that worked
I’ve been researching a bit and I’ve found potential candidates to replace HummusJS:
I’ve also stumbled upon this interesting article about compiling pdfcpu to Web Assembly: https://dev.to/wcchoi/browser-side-pdf-processing-with-go-and-webassembly-13hn.
I need to find some time to experiment with these.
@astefanutti
Did you or someone else have time to look into this? It would be awesome if this could be implemented platform independently with web assembly!
I’ve been experiencing the exact same issue @utdrmac is having, and the only working solution I’ve found is to do what he did, i.e., downgrading to node version 12.x. Really curious, though, to see if there is a fix (or, at least, a “hacky” workaround) to make this work with the latest node version 13.x.
Thanks everyone (and Happy New Year)!
I tried this.
Same error as above. I resolved the situation by downgrading node to 12.14 and then
npm install -g decktape
and it seems to be working again.