From nobody Thu Jun 22 20:44:54 2023 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QnC6n4hXnz4gB8w for ; Thu, 22 Jun 2023 20:45:05 +0000 (UTC) (envelope-from SRS0=fjdF=CK=quip.cz=000.fbsd@elsa.codelab.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QnC6m5zPWz3wt6 for ; Thu, 22 Jun 2023 20:45:04 +0000 (UTC) (envelope-from SRS0=fjdF=CK=quip.cz=000.fbsd@elsa.codelab.cz) Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of "SRS0=fjdF=CK=quip.cz=000.fbsd@elsa.codelab.cz" has no SPF policy when checking 94.124.105.4) smtp.mailfrom="SRS0=fjdF=CK=quip.cz=000.fbsd@elsa.codelab.cz"; dmarc=none Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id BE2FBD788B for ; Thu, 22 Jun 2023 22:44:55 +0200 (CEST) Received: from [192.168.145.49] (ip-89-177-27-225.bb.vodafone.cz [89.177.27.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id C25D9D788A for ; Thu, 22 Jun 2023 22:44:54 +0200 (CEST) Message-ID: Date: Thu, 22 Jun 2023 22:44:54 +0200 List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: cs-Cestina, en-US From: Miroslav Lachman <000.fbsd@quip.cz> Subject: Is it possible to build node package as single executable binary? To: FreeBSD Ports Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-0.66 / 15.00]; AUTH_NA(1.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_HAM_MEDIUM(-0.98)[-0.978]; NEURAL_HAM_SHORT(-0.89)[-0.888]; FORGED_SENDER(0.30)[000.fbsd@quip.cz,SRS0=fjdF=CK=quip.cz=000.fbsd@elsa.codelab.cz]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-ports@freebsd.org]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; R_SPF_NA(0.00)[no SPF record]; ASN(0.00)[asn:42000, ipnet:94.124.104.0/21, country:CZ]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; R_DKIM_NA(0.00)[]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DMARC_NA(0.00)[quip.cz]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ports@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; FROM_NEQ_ENVFROM(0.00)[000.fbsd@quip.cz,SRS0=fjdF=CK=quip.cz=000.fbsd@elsa.codelab.cz] X-Rspamd-Queue-Id: 4QnC6m5zPWz3wt6 X-Spamd-Bar: / X-ThisMailContainsUnwantedMimeParts: N 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