Open germanchiefprogrammer opened 2 years ago
Same issue using this module with an electron js app on windows. Windows 64 bit, Node v16.13.0, Electron 17.
Error: Module did not self-register: '\\?\C:\Users\uservm\Documents\lab\app\node_modules\@thiagoelg\node-printer\lib\node_printer.node'.
at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1800)
at Object.Module._extensions..node (node:internal/modules/cjs/loader:1199:18)
at Object.func [as .node] (node:electron/js2c/asar_bundle:5:1800)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (C:\Users\uservm\Documents\lab\app\node_modules\@thiagoelg\node-printer\lib\printer.js:10:22)
at Module._compile (node:internal/modules/cjs/loader:1116:14)
Same here. Can easily be reproduced using Electron Fiddle using this gist: https://gist.github.com/6a6c31a914134ecae919132019e3550e
Win 10 64 bit Electron Fiddle using Electron 18.0.1
App threw an error during load
Error: Module did not self-register: '\?\C:\Users\micro\AppData\Local\Temp\tmp-19104-6NpNGX2a8pUg\node_modules\@thiagoelg\node-printer\lib\node_printer.node'.
at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1812)
at Object.Module._extensions..node (node:internal/modules/cjs/loader:1199:18)
at Object.func [as .node] (node:electron/js2c/asar_bundle:5:1812)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.
I got the same error
Try running this command
./node_modules/.bin/electron-rebuild
You might need electron-rebuild added as a dep in package.json
Has anyone had any luck with this? I am having the same issue with Electron 19
I have been having the same issue with Electron 19. When I use electron 17 it seems to be working fine.
npm install @thiagoelg/node-printer@0.5.5 rebuild --runtime=electron --target=89 --target_archive=x64
facing issue in latest version, version 0.5.5 working for me, electron 11.4.9
same issue for me with nw
Hi!
Thank you very much for this convenient module. It works great direct in node.
I use a console app with "pkg". When i start the console application it returns an error like this:
`
`
I tested it with pkg package.json:
I also copied the file node_printer.node directly parallel to the new exe. The same issue.
I installed the module with:
Usage in code:
My versions are
Hope you can help me.