pixiedust_node icon indicating copy to clipboard operation
pixiedust_node copied to clipboard

Installing Node if it's not there

Open glynnbird opened this issue 8 years ago • 1 comments

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.

glynnbird avatar May 15 '17 15:05 glynnbird

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

glynnbird avatar Jun 15 '17 13:06 glynnbird