title: Electron with node-notifier display windows 10 notification
body: <p>I'm trying to make a simple app that should display notification when button is clicked. The problem is that the notification does not show, but console.logs are showing. Should the notification work on development mode? (meaning just running <code>electron .</code>, and I don't have to build and install the app)</p>
  
  <p><strong>Windows OS:</strong></p>
  
  <ul>
  <li>Edition: Windows 10 Home</li>
  <li>Version: 1709</li>
  <li>Build:16299.98</li>
  <li>NOTE: Toast is enabled (banner, action center) under <code>System-&gt;Notification &amp; Actions</code></li>
  </ul>
  
  <p>Code:</p>
  
  <pre><code>// main.js
  const { app, BrowserWindow, ipcMain, Notification } = require("electron");
  
  const path = require("path");
  const url = require("url");
  
  let win;
  
  function createWindow() {
    // Create the browser window.
    win = new BrowserWindow({ width: 800, height: 600 });
  
    // and load the index.html of the app.
    win.loadURL(
      url.format({
        pathname: path.join(__dirname, "index.html"),
        protocol: "file:",
        slashes: true
      })
    );
  
    // Open the DevTools.
    // win.webContents.openDevTools()
  
    // Emitted when the window is closed.
    win.on("closed", () =&gt; {
      // Dereference the window object, usually you would store windows
      // in an array if your app supports multi windows, this is the time
      // when you should delete the corresponding element.
      win = null;
    });
  }
  
  const appId = "elite-notifier";
  
  app.setAppUserModelId(appId);
  app.on("ready", createWindow);
  
  console.log("notifying");
  ipcMain.on("notify", () =&gt; {
    console.log("notified");
    const WindowsToaster = require("node-notifier").WindowsToaster;
    const notifier = new WindowsToaster({
      withFallback: false
    });
    notifier.notify(
      {
        title: "My awesome title",
        message: "Hello from node, Mr. User!",
        sound: true, // Only Notification Center or Windows Toasters
        wait: false // Wait with callback, until user action is taken against notification
      },
      function(err, response) {
        // Response is response from notification
        console.log("responded...");
      }
    );
  });
  
  
  // index.html
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;title&gt;Hello World!&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;h1&gt;Notifier!&lt;/h1&gt;
    &lt;button type="button" id="notify"&gt;Click here to trigger a notification!&lt;/button&gt;
        &lt;script type="text/javascript"&gt;
           const { ipcRenderer } = require('electron');
  
           const button = document.getElementById('notify');
           console.log('BUTTON: ', button)
           button.addEventListener('click', function(event) {
              console.log('clicked...');
              ipcRenderer.send('notify')
           });
        &lt;/script&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>