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

Error first time call this package #16

Open
rahmatkruniawan opened this issue Jun 16, 2017 · 5 comments
Open

Error first time call this package #16

rahmatkruniawan opened this issue Jun 16, 2017 · 5 comments

Comments

@rahmatkruniawan
Copy link

When put this code and run itu . I got some error
thi what I put in my code
var eNotify = require('electron-notify'); // Send simple notification eNotify.notify({ title: 'Notification title', text: 'Some text' });

the error
notify

@gilmoreg
Copy link

gilmoreg commented Jul 5, 2017

I got this error even when requiring from the console.
screen shot 2017-07-05 at 11 31 03 am

@tance77
Copy link

tance77 commented Nov 10, 2017

It's because this library is only suppose to be run in the render process. See this Pull Request

@m-o-leary
Copy link

So how is this supposed to work? I am importing in the render process - at least I am importing this into a component that is getting rendered to browser window, and still getting the error.

I am importing like this:
image

and getting:
image

trying const eNotify = require('electron-notify') doesn't improve anything.
Can someone please either update the documentation or make it clearer as to how this is supposed to be spun up initially.

Thx

@nolawnchairs
Copy link

I'm having the same issue here. I'm calling require("electron-notify") within the function scope of a method that is only called after the app is "ready".

Importing it or declaring a const in module scope causes an error on launch:
Error: Cannot require "screen" module before app is ready

Running this in the render process.

@tance77
Copy link

tance77 commented Dec 20, 2017

@buddythumbs @mweiczorek see this pull request you are trying to use this with a remote.

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

5 participants