Is it possible to build node package as single executable binary?

From: Miroslav Lachman <>
Date: Thu, 22 Jun 2023 20:44:54 UTC
Node.js / npm packages can be built in to single executable binary 
containing all node modules and node.js executable = everything packaged 
in one large executable, but by default it works for Win, Mac and Linux, 
not for FreeBSD.

Is there somebody successfully using it on FreeBSD?

I would like to build Bitwarden's CLI command "bw"
It can be installed on FreeBSD by "npm install @bitwarden/cli" and it 
works but can easily break with Node.js upgrade, that's why I would 
prefer to build it as single executable as it is distributed for Win, 
Max and Linux (it is called "Native executable" on Bitwearden's web)

Source code is on Github

But I don't know how to build only apps/cli (npm install in this 
subdirectory failed with missing modules and npm install in top level 
failed on electron install, because it tries to build everything, not 
only CLI bw)

Info for npm pkg

I am not node / JS developer, my knowledge of building node packages 
with npm / npx is very limited.
Any help is really appreciated.

Kind regards
Miroslav Lachman