Closed avilesj closed 4 years ago
I tried just using node
and just javascript and I can actually get it working. Seems to be mostly a webpack or electron issue, I'll see if I figure it out.
I'm still open for any kind of help regarding this. Thanks!
I sadly had to downgrade electron to 6.1.7 as specified in #282 .
Initially I was: Node 12.16.1 Electron 8.2.5
Now I am: Node 12.13.0 Electron 6.1.7
Full windows installation steps for me:
windows-build-tools
globallyprinter
node-glyp rebuild
electron-rebuild
(Maybe the previous step wasn't necessary, looking at this)Of course, if you're using electron remember to call printer from the main process. To use it in the render process call the remote
utility within electron.
I'm also disappointed I couldn't find a table matching nodejs/electron versions. The one at electron/node
is outdated and the website doesn't show an obvious way to find it (Seems to be only found on major version changes, like 8.0.0 release notes)
Will leave the issue open until monday to see if anyone chimes in and shows me a better way to do this.
I'm currently trying to get this library working and I'm having trouble.
Installation
I opted to go this way for installing.
And since I'm using both, NodeJS 12 and Electron 8.2.5, I followed this pr #289 to get it to compile.
I also installed
windows-build-tools
globally.The problem
When I compile the project (in typescript, with webpack), I get the error that
node_printer_win32_x64.node
cannot be found. I followed this issue #246 and I'm still having this issue.Solution Attempts
.node
file generated by the build process, rename it asnode_printer_win32_x64.node
just to have a parsing error by electron.I've looked issues related to installation but I can't seem to find anything related to windows that could actually help me.
Thanks for any help offered and thank you @tojocky for making this using native modules! (Other solutions just rely on another executable file to accomplish this)