Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does any face this error before in your electron project after installed new @electron/remote package?? #123

Open
mx51damon opened this issue Mar 21, 2022 · 2 comments

Comments

@mx51damon
Copy link

As you can see from the error below, after I have installed following packages

  • "electron": "^17.1.2",
  • "electron-builder": "^22.14.13",
  • "@electron/remote": "^2.0.8",
    I got below error message ...
    Screen Shot 2022-03-21 at 10 02 03 pm

My code is like this:

import { BrowserWindow } from '@electron/remote';
// import * as remote from '@electron/remote';

... ...

    this.browserWindow = new BrowserWindow(this.options);
    require('@electron/remote/main').initialize();
    require('@electron/remote/main').enable(this.browserWindow.webContents);
@mx51damon
Copy link
Author

Also, I found the error was caused from here:

TypeError: Cannot read properties of undefined (reading 'on')

Screen Shot 2022-03-22 at 9 51 45 am
)

@mx51damon
Copy link
Author

I also found that const electron_1 = require("electron"); line in @electron package is undefined ... I was confused how can I make node_modules' module package npm install? Can someone help me here, really frustrated at moment ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant