nodyn/jvm-npm

No way to dynamically extend NODE_PATH for resolving modules

Closed this issue · 1 comments

Node modules get searched for in java.lang.System.getProperty( "user.home" ) + "/.node_modules" and java.lang.System.getProperty( "user.home" ) + "/.node_libraries" directories. Unfortunately, on my machine (Windows 7) modules get installed below $userhome/AppData/Roaming/npm/node_modules. I need to manually set Require.NODE_PATH to my special path. I worked around the problem by editing NODE_PATH in jvm-npm.js directly, but i prefer to dynamically set the NODE_PATH after loading jvm-npm.js into the ScriptEngine. The only other way seems to keep NODE_PATH empty and define NODE_PATH as an environment variable, right?

lance commented

This should be fixed via #33