Installing Node if it's not there
If pixiedust_node is installed, could it conceivably install Node.js (node/npm) on the target system? If so how?
@DTAIEB said
"yeah, I think we could do a command line download/install of node under PIXIEDUST_HOME directory when we detect it’s not there"
Currently, we assume node is in the PATH so we run
self.ps = subprocess.Popen( ('node', path), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
This could be changed to:
home = get_ipython().home_dir
self.ps = subprocess.Popen( ('node', path), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd = home)
This would ensure node's home directory is the same as Pixiedust's.
So this module now detects whether it can find 'node' before attempting to run it. This is the first stage of doing this ticket.:)
see: https://github.com/ibm-cds-labs/pixiedust_node/commit/c9d142f334962c590007bbc53b9e5c24e86fc35e