Giter VIP home page Giter VIP logo

Comments (5)

jedi4ever avatar jedi4ever commented on May 19, 2024

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.

crcn avatar crcn commented on May 19, 2024

Should be a simple fix - probably just need to unshift node to process.argv[0]. I'll add this over the weekend.

from nexe.

asbjornenge avatar asbjornenge commented on May 19, 2024

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.

LorenzGardner avatar LorenzGardner commented on May 19, 2024

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.

jaredallard avatar jaredallard commented on May 19, 2024

Have you tried enabling the flags option on compile time?

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.