You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to figure out how to configure the base directory for the Node-integrated require() statements in the browser process. My end goal is running Electron on regular Node.js sources that may require native modules (like fs or node-opencv). (The gory details.)
With the following, for example, after npm install save-pixels --save
varsave=require('save-pixels')
This works when I run electron server.js from the same directory. However, say I am running this from an entirely different folder with its own modules:
I'm trying to figure out how to configure the base directory for the Node-integrated
require()
statements in the browser process. My end goal is running Electron on regular Node.js sources that may require native modules (like fs or node-opencv). (The gory details.)With the following, for example, after
npm install save-pixels --save
This works when I run
electron server.js
from the same directory. However, say I am running this from an entirely different folder with its own modules:Trying to run
electron ../app/server.js
from themy-module
folder still seems to look insideapp/node_modules
rather than the calling folder.Thanks. 😄
The text was updated successfully, but these errors were encountered: