Closed DTAIEB closed 6 years ago
Thanks David. That should be an easy fix.
Hi @DTAIEB I've made changes to fix the home directory when I create an npm/node subprocess to Environment.pixiedustHome
. But it works just as before.
After some investigation, I've found out it's because the pixiedustHome directory doesn't have a node_modules
directory so npm
goes up the directory tree looking for one. It finds one in my home directory so modules get installed there.
It works as expected if the pixiedustHome directory contains a node_modules
directory, so I modded the code to create the directory in pixiedust_node.
The node subprocess is launched using the wrong cwd (see https://github.com/ibm-watson-data-lab/pixiedust_node/blob/master/pixiedust_node/node.py#L27) it should match the npm command which is using the current working directory.
I think we should have both node and npm using the central working directory e.g. PIXIEDUST_HOME/node.
Note: you can get the PIXIEDUST_HOME directory using the Environment class from pixiedust.utils.environment import Environment Environment.pixiedustHome
/cc @glynnbird @bradnoble