Comments (5)
Found was the issue - the commandline tool used directly process.argv[2] , normally it was called with
node stats.js config.js => having the config.js as arg2
after compile it is
./statsd config.js => having the config.js as arg1
from nexe.
Should be a simple fix - probably just need to unshift node
to process.argv[0]
. I'll add this over the weekend.
from nexe.
I still have to pass a first arg to the built binary to get it working (on 0.2.8)...
Works:
./app whatever --taget test --ttl 10
Does not work:
./app --taget test --ttl 10
In the second case the params seems to be passed to node itself? I'm not sure...
from nexe.
This seems like incorrect behavior to me (and makes adding native module support harder than it needs to be as it messes with binding libraries that would be useful).
The first argument needs to be the executable. node, is no longer the executable the built app is (yes i know that is actually node, but you know what I mean) so that should be the first argument.
Rather than shifting node into the first argument we should splice "nexejs" into the second argument, leaving the built executable as the first argument and all actual args to follow after.
In this way argv to the module will indeed look right ([0] = executable, [1] the node root module, [2] argument, ect ...)
from nexe.
Have you tried enabling the flags option on compile time?
from nexe.
Related Issues (20)
- bug
- 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 2
- 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
- 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. HOT 9
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.