Run nodeJS program via script package with cli arguments


I’ve tried to configure run options to add some command line arguments @ program arguments field.
(using script package)
when I run it I only get 1 argument: ‘path/to/node’ . :confused:

how can I make it work?

(btw running in cli: node program.js arg1 arg2 // works)

Do you wrap each arg in curly brackets … e.g.

python {arg1} {arg2}

My preference is to use process-palette instead of script.

running with JS with script works ok, it’s just not clear how to run node.js with paremeters inside atom with script…

I’m not trying to run python… but i did tried with {} here’s the error I got…

Unable to run

node /home/username/JS/cliArgs.js

Did you start Atom from the command line?

atom .

Is it in your PATH?

PATH: /usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl

this is the error massage I receive… I will have a look at process-palette.


Run command: which atom to find atom path.

e.g. /usr/bin/atom

Add this atom path to $PATH (e.g. in ~/.profile)

touch ~/.profile

Try again.

/usr/bin is already in $PATH
problem not solved but I’ve found a workaround to simulate my needs.

process.argv[1] = ‘arg1’;

Thanks for helping d_l