UPDATE:
A similar question was asked, and my answer will most likely help you here:
If you do not add the node_modules application directory node_modules under your application root to the NODE_PATH variable, it will not work. So you need to do something like this:
export NODE_PATH=/PATH/TO/APP/node_modules electron /PATH/TO/APP
When exporting NODE_PATH make sure you provide an absolute path.
If the electron cannot find the modules when you usually
require them, this is a sign that your
package.json does not contain modules as a dependency
even if the module is already available in your
dist directory.
So make sure you are inside the dist directory and use
npm install
Check out the --save flag!
Yan Foto Jul 28 '15 at 11:16 2015-07-28 11:16
source share