Giter VIP home page Giter VIP logo

Comments (9)

purplescorpion1 avatar purplescorpion1 commented on June 2, 2024 1

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.

purplescorpion1 avatar purplescorpion1 commented on June 2, 2024 1

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.

levir10 avatar levir10 commented on June 2, 2024 1

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

purplescorpion1 avatar purplescorpion1 commented on June 2, 2024 1

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.

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.

levir10 avatar levir10 commented on June 2, 2024

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.

levir10 avatar levir10 commented on June 2, 2024

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.

attikov avatar attikov commented on June 2, 2024

compiler.js
line 163 add:

            shell: true,

before

            cwd: this.src,

from nexe.

terrykingdev avatar terrykingdev commented on June 2, 2024

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.

FloMaetschke avatar FloMaetschke commented on June 2, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.