This project is read-only.

Error in command line parsing

Feb 10, 2016 at 11:49 AM
There seems to be something wrong with command line parsing. See image bellow:


Seemingly, it does not exclude the script-name from the argv list, and attempts to interpret it as a document name. This effectively means I unfortunately cannot use Madoko at this time as it will not run :(.
Feb 12, 2016 at 10:12 PM
Very strange! Can you tell me what nodejs version you are running, and on what OS you tried this?
Feb 13, 2016 at 5:49 PM
I can do you one better: here is the vagrantfile. You'll be able to trivially recreate my environment easily.
Mar 8, 2016 at 11:30 AM
Did you manage to figure something out?
Mar 8, 2016 at 11:32 AM
Oh, wait, it seems the link wasn't posted O_o? Anyways, here is the actual file:
Mar 8, 2016 at 6:05 PM
Hi Alxandr,

I haven't used vagrant files before :-( Should I read a tutorial or is it too much hassle to learn how to use this?

I was just looking at the code for getting arguments and I see that there is a provision for when madoko is started as a script; i.e. on windows madoko will point to a batch file that runs something like node madoko.js; when the first item in the raw command line is node, it is discarded. I am guessing that on your machine, somehow the program used to run Madoko is not node, but perhaps Node.exe or something? Can you check? I would like to fix this before the official 1.0 release :-)
Mar 14, 2016 at 9:38 AM
Not exactly sure how I should check. The OS is an old version of ubuntu LTS (12.04 IIRC). It's the one named precise. After provisioning the machine the following scripts are run: I'll try simply running node and inspecting the process args.

On a side-note (not trying to be an evangelist or anything) vagrant is really easy and you should check it out. Basically, if you do not have a hypervisor (like Hyper-V) or if you have VirtualBox installed you can grab the install from their website and run it. After that you put a console/terminal at the directory containing your vagrant file and go vagrant up and that's it. To access the VM you do vagrant ssh and it mounts your local file-system (at the exact folder containing your Vagrantfile) at /vagrant in the vm. The point is to get the exact same environment at all machines, while still allowing people to use their favorite editors in their favorite OS to do the actual coding. But anyways.

Here's the node-process path on my install. Basically, do not assume node to be called node. It can be called anything (including for instance iojs).