node-printer
node-printer copied to clipboard
printer.js MODULE_NOT_FOUND after compiling project with pkg
I've compiled my project to an .exe file with pkg. If i run the .exe file on the same computer where i installed printer.js then everything is fine. If i run it on a different computer, then the package cannot find the printer module. Here's the error:
`pkg/prelude/bootstrap.js:1359 throw error; ^
[Function.Module._resolveFilename (internal/modules/cjs/loader.js:1027:15),Function._resolveFilename (pkg/prelude/bootstrap.js:1459:46),Function.Module._load (internal/modules/cjs/loader.js:896:27),Module.require (internal/modules/cjs/loader.js:1087:19),Module.require (pkg/prelude/bootstrap.js:1338:31),require (internal/modules/cjs/helpers.js:73:18),Object.
you can copy the node_printer.node
from /node_modules/printer/lib/node_printer.node
to your pkg output .exe