I need to set an environment variable from Node (currently using v8.9.3)  Ideally, I would like to run export DATA_DIR=/var/lib/data when the program starts.  1. Tried spawning a child_process to set this, but it does not appear to work.  Example:  c...
To run a node command within the "context" of your installed node_modules, you can make an entry in the scripts field of package.json.  Eg:  ...   "scripts": {     "test": "mocha --recursive test/**/*.js --compilers js:bab...
I have a question regarding JavaScript and methods by which its code can be run. As we know, there is some JavaScript code embedded in  tags and it runs natively within browser window - that's quite common and that's how the web pages current...
I'm completely lost with figuring out why my PHP script produces different results when run via CLI (producing the right results) vs when run within Node.js via the exec function.  Here's my PHP. Note the fopen('blah.txt', 'w'...
I have built a GUI with Node.js that allows a user to run custom binaries, designed for CLI. These binaries are spawned with child_process module. A user is able to write to stdin and read from stdout of those child processes.  Yet, when a binary use...
I would like to be able to create a node-webkit (nw.js) application and then be able to start it from the command line with arguments to pass into the application itself. I would like to be able to run the command release ./project and have it launch...
I'm looking for a CLI tool, npm package or gulp/grunt plugin to validate proper indentation in HTML files.  All the options that I've tried don't report an error if the file is using the right spaces or tabs settings but the number of spa...
is there a way to use an ecmascript module file as the main entry file to a cli exported using the package.json bin entry?  i guess i would need to somehow provide the --experimental-modules flag, but i can not figure out a way to do this without wra...
I'm currently trying to make a simple command-line node program that allows for me to easily create a boilerplate for a lot of the React/Redux applications that I make. I'm using ShellJS to execute console commands (I've tried using Node&...
I'm having a problem using npm link with a nodejs cli tool built using commander.  Using commander to make a git-style sub command style cli tool I have these files:  foo.js  foo-config.js  And foo.js (the main file looks like this)  #!/usr/bin/e...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.