Comments (9)
How to fix locally until fix is merged with source
Download the source code
git clone https://github.com/nexe/nexe.git
open cmd window at source code root
npm install
Open nexe\src\compiler.ts with notepad++ (different from windows notepad! goggle it)
Go to line 211 env: this.env,
Below this line add
shell: true,
Save
In cmd (at same location as nexe source root)
npm link
cd to the directory of your project you want to use nexe
npm link nexe
now run your command to use nexe
eg
nexe -i myfile.js -o nameofexe -t windows --build --verbose
Thanks to mikoto2000 for the fix
Pull request with fix #1092
Tested on node version 21.7.3
from nexe.
thanks for the explenation. i tried this, and indeed the EINVAL error did not apear. i got another error (ran this command) 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 --output "myApp.exe"
and got error :
Debugger attached. i nexe 5.0.0-beta.1 √ Included 42 file(s) √ Including dependency: C:\Users\Or-Admin\OneDrive - Tidhar\BIM\Forge\webApps\BI_Fitouts\node_modules\dotenv\package.json √ Already downloaded... √ Compiling Node with arguments: nosign,release,x64 √ Finished in 83.944s
Error: vcbuild.bat nosign release x64 exited with code: 1
** using node v20.12.2 **tried to download nasam ( as suggested here: #799 ) --> still did not work
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
from nexe.
@purplescorpion1 thank you for your explenation!
it did not work at first (through the vs code's project terminal) , but then i restarted, and cd to the projects folder using the command line, and it finally worked,...
from nexe.
Hi, thx for this hotfix. We got the same error and adding
shell: true,
solved the issue. In the moment, this bug blocks our build agent, which does a freshnpm ci
on each run.
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
from nexe.
i have the same error.
node version: v20.12.2
nexe version: 4.0.0-rc.4
(windows x64) .
tried to run this command:
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"
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
√ Included 42 file(s)
√ Already downloaded...
√ Compiling Node with arguments: nosign,release,x64
√ Finished in 1.32s
Error: spawn EINVAL
at ChildProcess.spawn (node:internal/child_process:421:11)
at spawn (node:child_process:761:9)
at C:\Users\Or-Admin\AppData\Roaming\npm\node_modules\nexe\lib\compiler.js:162:39
at new Promise ()
at NexeCompiler._runBuildCommandAsync (C:\Users\Or-Admin\AppData\Roaming\npm\node_modules\nexe\lib\compiler.js:161:16)
at NexeCompiler. (C:\Users\Or-Admin\AppData\Roaming\npm\node_modules\nexe\lib\compiler.js:200:24)
at Generator.next ()
at fulfilled (C:\Users\Or-Admin\AppData\Roaming\npm\node_modules\nexe\lib\compiler.js:11:58)
from nexe.
thanks for the explenation.
i tried this, and indeed the EINVAL error did not apear. i got another error
(ran this command)
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 --output "myApp.exe"
and got error :
Debugger attached.
i nexe 5.0.0-beta.1
√ Included 42 file(s)
√ Including dependency: C:\Users\Or-Admin\OneDrive - Tidhar\BIM\Forge\webApps\BI_Fitouts\node_modules\dotenv\package.json
√ Already downloaded...
√ Compiling Node with arguments: nosign,release,x64
√ Finished in 83.944s
Error: vcbuild.bat nosign release x64 exited with code: 1
** using node v20.12.2
**tried to download nasam ( as suggested here: #799 ) --> still did not work
from nexe.
compiler.js
line 163 add:
shell: true,
before
cwd: this.src,
from nexe.
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.
from nexe.
Hi, thx for this hotfix.
We got the same error and adding shell: true,
solved the issue.
In the moment, this bug blocks our build agent, which does a fresh npm ci
on each run.
from nexe.
Related Issues (20)
- Node20: executable is resolving entrypoint from the filesystem HOT 1
- Promise not resolving HOT 1
- How to exclude files and folder from being included in a nexe build?!
- vcbuild.bat nosign release x64 exited with code: 1 HOT 3
- Using NEXE with NodeJS v20? HOT 2
- This repository has a ton of the exact same issues listed HOT 3
- Project Status HOT 1
- Meet 'ReferenceError: file is not defined' after build from source HOT 2
- node exe is unable find sqlite3 HOT 1
- Are monorepos supported? HOT 1
- _third_party_main: this is not a typed array HOT 1
- sqlite3 errors
- Node CLI options are not disabled for node 20.11 HOT 1
- Error: vcbuild.bat nosign release x64 exited with code: 1 HOT 1
- Nexe eats up any command line parameter starting with -- like --help HOT 3
- Confused Usage - Help About Node 18 Versions HOT 3
- Build flag with windows-x64-20.11.1 produces 16bit results ? HOT 1
- Feature Request: Replace download dependency with node-downloader-helper or something similar to resolve CVE-2022-33987
- node_modules unclear behaviour
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nexe.