x64dbg icon indicating copy to clipboard operation
x64dbg copied to clipboard

Confused Usage - Help About Node 18 Versions

Open andre-mr opened this issue 11 months ago • 4 comments

Hi.

I tried to package my node app.js using pkg. it worked like a charm, using just "pkg ." But i figured out that pkg uses Node 18.5 as last Node release available, and pkg was deprecated in January 2024.

Then i tried nexe, but all seems confusing to me:

  • I tried basic usage 'nexe app.js' and got this:
i nexe 4.0.0-rc.4
√ Downloading pre-built Node.js
√ Finished in 0.452s

Error: https://github.com/nexe/nexe/releases/download/v3.3.3/windows-x64-18.18.0 is not available, create it using the --build flag

See nexe -h for usage..

Well. Node 18.18.0 is the version i'm using here, but I just didn't find where is stated that nexe will use current version other than download, or try to download a pre-build version exactly the same number i have in use.

From docs I see --target option but got confused about if those version numbers are about node or nexe specific builds. It seems the latest for windows x64 is this: windows-x64-14.15.3 - 53.9 MB - Jan 3, 2021

That 'releases' page is signed as "v3". Is that version number a NodeJS version? Why so old? Don't we have any prebuild package using not deprecated Node versions like 18 or 20?

I see there is a build option where I need to prepare my system for a local build, and I wonder if that's the only workaround to use Node 18+ (18.18+ really) to build the exe.

I'm trying to use Node 18.18 or newer other than 18.5 available with pkg, because my app uses Fetch API and for node 18.5- every time it executes a 'experimental warning' is shown in terminal.

It could be node 20+ too.

Thanks for help.

andre-mr avatar Mar 02 '24 19:03 andre-mr

I had the same situation and still used the --build. It takes some time only once (as in the future it has already downloaded all it needs) and after that builds it lightning fast every time so I strongly recommend trying the "uncomfortable" way next time as well.

vuquanganhnguyen avatar Mar 19 '24 06:03 vuquanganhnguyen

@vuquanganhnguyen @andre-mr I tried to use the --build flag but get the below error, please how do I fix it.

nexe app.js --build
i nexe 4.0.0-rc.4
√ Already downloaded...
√ Compiling Node with arguments: nosign,release,x64
√ Finished in 13.798s

Error: vcbuild.bat nosign release x64 exited with code: 1

See nexe -h for usage..

I have tried as the docs says to install the prerequisites, but got error, any suggestions thanks in advance.

Installing visualstudio2022-workload-vctools...


Unhandled Exception: System.ArgumentException: --add
Parameter name: --add
   at Microsoft.VisualStudio.Setup.Installer.CommandLine.CommandLineParser.HandleMultiInstanceOption(String option, IEnumerable`1 args)
   at Microsoft.VisualStudio.Setup.Installer.CommandLine.CommandLineParser.MergeMultiInstanceOption(IEnumerable`1 args)
   at Microsoft.VisualStudio.Setup.Installer.CommandLine.CommandLineParser.PreProcessArgs(IEnumerable`1 args, Boolean& finalizeInstall, Boolean& uninstallSelf)
   at Microsoft.VisualStudio.Setup.Installer.CommandLine.CommandLineParser.Parse(IEnumerable`1 args)
   at Microsoft.VisualStudio.Setup.Installer.Program.CreateParserResult(IServiceContainer services, String[] args)
   at Microsoft.VisualStudio.Setup.Installer.Program.Main(String[] args)
VERBOSE: Examining Visual Studio Installer log files (C:\Users\user\AppData\Local\Temp\chocolatey\\dd_*.log)
ERROR: The installation of visualstudio2022-workload-vctools failed (installer exit code: 255).
The install of visualstudio2022-workload-vctools was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\visualstudio2022-workload-vctools\tools\ChocolateyInstall.ps1'.
 See log for details.
[NuGet]   GET https://community.chocolatey.org/api/v2/Packages()?$filter=(tolower(Id) eq 'microsoft.visualstudio.component.vc.tools.arm64') and IsLatestVersion&semVerLevel=2.0.0
[NuGet]   OK https://community.chocolatey.org/api/v2/Packages()?$filter=(tolower(Id) eq 'microsoft.visualstudio.component.vc.tools.arm64') and IsLatestVersion&semVerLevel=2.0.0 105ms
Microsoft.VisualStudio.Component.VC.Tools.ARM64 not installed. The package was not found with the source(s) listed.
 Source(s): 'https://community.chocolatey.org/api/v2/'
 NOTE: When you specify explicit sources, it overrides default sources.
If the package version is a prerelease and you didn't specify `--pre`,
 the package may not be found.
Please see https://docs.chocolatey.org/en-us/troubleshooting for more
 assistance.

aynuayex avatar Mar 28 '24 10:03 aynuayex

Please refer to my anwsers in stackoverflow, hope it helps https://stackoverflow.com/questions/57879150/how-can-i-solve-error-gypgyp-errerr-find-vsfind-vs-msvs-version-not-set-from-c/78157088#78157088 https://stackoverflow.com/questions/75851339/nexe-not-working-with-node-version-15-8-0/78191558#78191558

vuquanganhnguyen avatar Mar 28 '24 11:03 vuquanganhnguyen

Hi! Maybe that issue will help you https://github.com/nexe/nexe/issues/1003

Armanio avatar Jun 29 '24 08:06 Armanio