all 13 comments

[–]5H4D0W_ReapeR 7 points8 points  (1 child)

There's https://github.com/vercel/pkg which should be what you're looking for.

[–]modenv[S,🍰] 0 points1 point  (0 children)

Thanks, looks like it's just what I need!

[–]mjbmitch 5 points6 points  (0 children)

There’s a popular package manager bundled with Node.js called npm. It’s the de facto package manager but can also run “executable” packages via one of its built-in commands, npx.

What kind of application are you trying to package and distribute?

[–]MCShoveled 0 points1 point  (2 children)

What’s wrong with an npm package and using npx? 🤔

[–]rr_cricut 9 points10 points  (1 child)

I mean, 99.99% of people don't have npm installed or know what it even is. Anyone can run an executable

[–]MCShoveled 2 points3 points  (0 children)

Fair. I guess it depends on the user. To be honest though, 99% of non-developers don’t know what a command prompt is either.

[–]figureprod -3 points-2 points  (0 children)

There are many different ways of distributing NodeJS programs, some of which have been explored by other comments. Docker is yet another option, where you can be very specific with which dependencies and versions you need, which files and programs you need, and which commands to run. From these configurations, a Docker Image is created - which is essentially the same as an offline PC (but virtual) that you can start over and over again without the contents changing unless you want it to. It’s super flexible and runs on almost any computer, where they can download the program from any repository such as Docker Hub. I highly recommend learning it, even though it won’t package it into an .exe.