Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confused Usage - Help About Node 18 Versions #1085

Open
andre-mr opened this issue Mar 2, 2024 · 3 comments
Open

Confused Usage - Help About Node 18 Versions #1085

andre-mr opened this issue Mar 2, 2024 · 3 comments

Comments

@andre-mr
Copy link

andre-mr commented Mar 2, 2024

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.

@vuquanganhnguyen
Copy link

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.

@aynuayex
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants