node-printer icon indicating copy to clipboard operation
node-printer copied to clipboard

Electron App crashes on startup

Open achimkoellner opened this issue 7 years ago • 4 comments

I'm using quasar with electron 1.8.1 and printer 0.2.2 I can dev-build and print using the module but if I make a prod build (which works) the app crashes on startup with a little helpful stacktrace saying cannot find module '.'

if I installed and built printer using

npm install printer --runtime=electron --target=1.8.1 --target_arch=x64 --python=python2.7

I guess --target refers to the electron version number, right?

I will have to be able to build for windows and OSX. I guess the target_arch param for windows would be another one.

If I remove references to printer it all works (but doesn't print of course) in prod build. Got a bit stuck at that point.

achimkoellner avatar Jan 09 '18 07:01 achimkoellner

Don't put the target and then install electron-rebuild to rebuild node-printer

Xosmond avatar Jan 28 '18 15:01 Xosmond

@achimkoellner were you able to resolve the crush problem? I am having the same issue.

5sword avatar May 18 '18 07:05 5sword

No, we solved it by printing from frontend process

achimkoellner avatar May 18 '18 07:05 achimkoellner

@achimkoellner thanks for the reply. I actually just fixed the problem. I was using electron builder to build and node-printer was in devDependencies. moving node-printer to dependencies solve the problem.

Just curious, how are you printing from frontend process?

5sword avatar May 18 '18 08:05 5sword