Giter Site home page Giter Site logo

process.argv value is invalid about iron-node HOT 8 CLOSED

s-a avatar s-a commented on July 18, 2024
process.argv value is invalid

from iron-node.

Comments (8)

s-a avatar s-a commented on July 18, 2024

Sorry I am on the run...
In short: You expect the full path to a.js right?

I think this regards to this code

result = path.resolve(process.cwd(), filename);

Will check this out soon. Maybe you can see something there?

from iron-node.

mik01aj avatar mik01aj commented on July 18, 2024

In this case, yes. I expect exactly the same result as in Node (with or without debug, it's not very important).

In node debugger it looks tricky, because the modules get a different value than what is accessible from the debugger. What's important is the value that the modules get.

from iron-node.

s-a avatar s-a commented on July 18, 2024

@mik01aj just published a new version via npm. Please let me know if this works for you.

from iron-node.

mik01aj avatar mik01aj commented on July 18, 2024

Still the same, using [email protected]. Btw, this is what npm says; the app title bar says it's v1.2.16.

screenshot 2015-08-10 09 57 02

from iron-node.

s-a avatar s-a commented on July 18, 2024

This indicates you are using old code.
Title bar shows package.json.version

This is what I get at:

C:\test>iron-node test.js

image

Can you research and give feedback what is causing this, just to be shure that this is not a general issue.

from iron-node.

mik01aj avatar mik01aj commented on July 18, 2024

I figured it out: before I started using nvm, my npm installed packages to /usr/local/lib/node_modules and their binaries to /usr/local/bin. After I started using nvm, all packages got installed to ~/.nvm/versions/node/v0.12.7/lib/node_modules and the binaries to ~/.nvm/versions/node/v0.12.7/bin. The problem was, that /usr/local/bin was first in the $PATH variable, so I was using the package that was installed for an older version of Node.

So now I'm really using 1.5.27 and I'm happy to say that it works now! Thanks! :)

from iron-node.

s-a avatar s-a commented on July 18, 2024

Ty for your feedback 👍

from iron-node.

mik01aj avatar mik01aj commented on July 18, 2024

FYI: now I know why process.argv was different when I checked it in node debug. It was in the debugger context. To enter the script conext, I need to use the repl command.

from iron-node.

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.