Date: Fri, 23 Jun 2023 20:11:41 +0900 From: Hiroki Tagato <tagattie@FreeBSD.org> To: Miroslav Lachman <000.fbsd@quip.cz>, FreeBSD Ports <freebsd-ports@freebsd.org> Subject: Re: Is it possible to build node package as single executable binary? Message-ID: <5be6c0d2-5d71-38c9-028a-8ce065102be9@FreeBSD.org> In-Reply-To: <c50228d7-63c7-0e5c-7b38-d9e4c5a3e795@quip.cz> References: <c50228d7-63c7-0e5c-7b38-d9e4c5a3e795@quip.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Miroslav, I have a WIP port of Bitwarden CLI in my forked ports repository. Take a look at: https://github.com/tagattie/freebsd-ports/tree/main/security/bitwarden-cli It generates a single binary executable "bw" by packaging the node command and necessary node modules. I have only lightly tested the package on FreeBSD 13/amd64 and it seems working. Hope this helps. Cheers, Hiroki On 2023/06/23 5:44, Miroslav Lachman wrote: > 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" > https://bitwarden.com/help/cli/ > 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 > https://github.com/bitwarden/clients/tree/master/apps/cli > > 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 https://github.com/vercel/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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5be6c0d2-5d71-38c9-028a-8ce065102be9>