When Electron initializes the Module paths, it will grab everything from NODE_PATH and merge it with the user's home dirs.
However, at some point in execution, this Module.globalPaths is mutated and replaced with a new set of paths pointing to electron globals so that require('electron') will work. It is unclear where this mutation is happening, and at what point we need to re-patch the Module.globalPaths array to fix this.
To recap, these two features are broken right now:
NODE_PATH is not respected
.node_modules and .node_libraries in home dir is not respected
This is related to #6.
When Electron initializes the Module paths, it will grab everything from
NODE_PATH
and merge it with the user's home dirs.However, at some point in execution, this
Module.globalPaths
is mutated and replaced with a new set of paths pointing to electron globals so thatrequire('electron')
will work. It is unclear where this mutation is happening, and at what point we need to re-patch theModule.globalPaths
array to fix this.To recap, these two features are broken right now:
NODE_PATH
is not respected.node_modules
and.node_libraries
in home dir is not respected