Tuesday, 26 December 2017

How to access Node.js console module?

Hi all, new to Node.js here. I am trying to contribute to an open source project (project here) that is written in JavaScript and requires Node.js to run. I have installed both Node and the package in-question on my system (Windows 10), but I can't seem to run the package and have access to the Node.js console module at the same time. How can I do so?The package is command line based, and to run it, from my terminal (Git Bash), I run a typical command (e.g. game -t) with the syntax:NODE_ENV=development node bin/cli.js game -t But when I do this, I can't seem to access the console module (I encounter a bash: command not found error). I can only access the console module after I explicitly enter the Node environment, with the node command. Once I run the node command, I then enter an environment that recognizes my JS commands, including console.log(). But I'm not sure how to run the package in-question from this environment. How can I run the package, but also view console output at the same time?FYI I am using Node.js version 8.9.3 and npm version 5.5.1Thanks in advance.

Submitted December 26, 2017 at 12:36PM by cag8f

No comments:

Post a Comment