Error: Cannot find module 'remote' #122

andig opened this Issue Aug 14, 2016 · 2 comments


None yet

2 participants

andig commented Aug 14, 2016

I'm using app.js and have added dev tools. In the console I'm getting Error: Cannot find module 'remote' in module.js 440. I have not changed the repo structure.

Any idea what might be the problem with finding remote?

andig commented Aug 14, 2016

It might be that with current versions of electron it should read something like this:

var remote = require('electron').remote;
var Menu = remote.Menu;
var MenuItem = remote.MenuItem;
samuelyeshua commented Aug 14, 2016 edited

But because you are making use of "remote" in the main process when it is made to be used in the application renderer side?

In Electron, GUI-related modules (such as dialog, menu etc.) are only available in the main process, not in the renderer process. In order to use them from the renderer process, the ipc module is necessary to send inter-process messages to the main process. With the remote module, you can invoke methods of the main process object without explicitly sending inter-process messages, similar to Java’s RMI.
--- Remote Docs

Ie these modules are not indexed to the "remote"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment