Steveorevo / node-red-contrib-nbrowser

Provides a virtual web browser (a.k.a. "headless browser") appearing as a node.
35 stars 13 forks source link

Cannot find module '../../electron' #30

Closed guenter-ms closed 3 years ago

guenter-ms commented 4 years ago

Hello

wenn tried to inject any url e.g. "www.google.de" using "gotoURL" function, nodered crashes with following log entries.

Any ideas to fix that?

Oct 26 18:11:10 homematic-raspi daemon.err node-red: 26 Oct 18:11:10 - [red] Uncaught Exception: Oct 26 18:11:10 homematic-raspi daemon.err node-red: 26 Oct 18:11:10 - Error: Cannot find module '../../electron' Oct 26 18:11:10 homematic-raspi daemon.err node-red: Require stack: Oct 26 18:11:10 homematic-raspi daemon.err node-red: - /usr/local/addons/redmatic/var/node_modules/node-red-contrib-nbrowser/nbrowser/nbrowser.js Oct 26 18:11:10 homematic-raspi daemon.err node-red: - /usr/local/addons/redmatic/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js Oct 26 18:11:10 homematic-raspi daemon.err node-red: - /usr/local/addons/redmatic/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js Oct 26 18:11:10 homematic-raspi daemon.err node-red: - /usr/local/addons/redmatic/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js Oct 26 18:11:10 homematic-raspi daemon.err node-red: - /usr/local/addons/redmatic/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js Oct 26 18:11:10 homematic-raspi daemon.err node-red: - /usr/local/addons/redmatic/lib/node_modules/node-red/lib/red.js Oct 26 18:11:10 homematic-raspi daemon.err node-red: - /usr/local/addons/redmatic/lib/node_modules/node-red/red.js Oct 26 18:11:10 homematic-raspi daemon.err node-red: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:892:15) Oct 26 18:11:10 homematic-raspi daemon.err node-red: at Function.Module._load (internal/modules/cjs/loader.js:742:27) Oct 26 18:11:10 homematic-raspi daemon.err node-red: at Module.require (internal/modules/cjs/loader.js:964:19) Oct 26 18:11:10 homematic-raspi daemon.err node-red: at require (internal/modules/cjs/helpers.js:88:18) Oct 26 18:11:10 homematic-raspi daemon.err node-red: at nbrowser_worker (/usr/local/addons/redmatic/var/node_modules/node-red-contrib-nbrowser/nbrowser/nbrowser.js:27:35) Oct 26 18:11:10 homematic-raspi daemon.err node-red: at Timeout._onTimeout (/usr/local/addons/redmatic/var/node_modules/node-red-contrib-nbrowser/nbrowser/nbrowser.js:431:21) Oct 26 18:11:10 homematic-raspi daemon.err node-red: at listOnTimeout (internal/timers.js:554:17) Oct 26 18:11:10 homematic-raspi daemon.err node-red: at processTimers (internal/timers.js:497:7) Oct 26 18:11:10 homematic-raspi daemon.err node-red: Node-RED exited with non-zero exit status 1

Steveorevo commented 3 years ago

Electron refers to the hidden web browser. If you do not have a window manager installed, this can happen. Please reference: https://github.com/Steveorevo/node-red-contrib-nbrowser/issues/17#issuecomment-473386507