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

[Question] what's the recommended way to create single executable file

Open saostad opened this issue 3 years ago • 2 comments

what's the recommended way to create a single executable file from a node js app that using the keytar in it? I tried pkg and boxednode but couldn't create a clean solution out of it. please advice.

saostad avatar Mar 02 '21 15:03 saostad

I don't have any recommendations, but that's mostly because I haven't tried this.

What hurdles did you encounter while doing this?

shiftkey avatar Mar 02 '21 18:03 shiftkey

there are some packages that can generate a single executable file from a node project. pkg and nexe can't embed native modules so I have to ship my .node files alongside my executable file. boxednode can embed .node files but works with one .js entry point so I have to bundle my code with a bundler like Parcel or Rollup but it looks like code bundled with those bundlers somehow is not compatible with the keytar, plus because it builds node from the source, it takes forever (more than 20 mins on a powerful laptop) to create the executable file.

saostad avatar Mar 02 '21 21:03 saostad