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
I got Error: spawn EINVAL
error, after change host's node version 21.7.2
to 21.7.3
or 20.12.1
to 20.12.2
on Windows.
#1091
Comments
i have the same error. node version: v20.12.2 this is the log and error: PS C:\Users\Or-Admin\OneDrive - Tidhar Construction\BIM\Forge\BI_Fitouts> nexe start.js -r "config.js" -r "nexe.config.js" -r "routes/common/oauth.js" -r "routes" -r "public//." -r ".vscode/**/." -r "package-lock.json" -r "package.json" --build --node --output "BI-Fitouts-local.exe" i nexe 4.0.0-rc.4 |
How to fix locally until fix is merged with source Download the source code open cmd window at source code root Open nexe\src\compiler.ts with notepad++ (different from windows notepad! goggle it) Go to line 211 env: this.env, Save In cmd (at same location as nexe source root) cd to the directory of your project you want to use nexe npm link nexe now run your command to use nexe eg Thanks to mikoto2000 for the fix Tested on node version 21.7.3 |
thanks for the explenation. and got error : Debugger attached. Error: vcbuild.bat nosign release x64 exited with code: 1 ** using node v20.12.2 |
Make sure you have visual studio 2022 installed and the visual studio build tools If you have both of these installed do a clean of nexe enter your command you would use to run what you want to package but start it with nexe --clean (rest of your command) then enter the command again without the --clean I also have nasam added to path (windows environmental values) but I don't think this error relates to that |
@purplescorpion1 thank you for your explenation! |
compiler.js
before
|
OMG I wish I would have come here first, I've spent all day trying to use nexe with node 18.20.2 and kept failing but it compiled fine with 18.15.0. As I was installing on my new work PC I was convinced I'd missed some prereq install, turned out the shell: true is all it needed for me. |
Hi, thx for this hotfix. |
All I can suggest is forking the repo into your own account. Apply the correction then have your build agent run it from your fork. You could always upload it to npm under a different name if you can't run it directly from GitHub. Not sure what the requirements are |
Fixes issue: nexe#1091 of original repository
What happened:
I got
Error: spawn EINVAL
error, after change host's node version21.7.2
to21.7.3
or20.12.1
to20.12.2
. on Windows.maybe related
CVE-2024-27980
.See: https://nodejs.org/en/blog/release/v21.7.3
nexe/src/compiler.ts
Lines 209 to 213 in 175bbf1
nexe version
nexe 5.0.0-beta.1
and node version20.12.2
What you expected to happen:
Build success.
How to reproduce it (as minimally and precisely as possible):
example/express-app
nexe -i ./index.js -t windows-x64-20.12.1 -b -o ./dist/express-app-windows-x64-20.12.1-nexe.exe
Anything else we need to know?:
Environment:
mcr.microsoft.com/windows/servercore:ltsc2022
)21.7.3
,20.12.2
,18.20.2
v5.0.0-beta.1
,v4.0.0-rc.4
3.12
The text was updated successfully, but these errors were encountered: