question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Notifications are not fired after making a windows executable using electron-builder

See original GitHub issue

Node notifier is not getting fired after being packaged using electron-builder for windows. Node-Notifier needs to be unpacked as suggested. I believe I am making a mistake in the package.json while executing this process when using electron-builder.

 '"build": {
    "appId": "NotiTest",
    "asarUnpack": [
      "./app/node_modules/node-notifier/vendor/**"
    ],
    "win": {
      "icon": "./build/images/app-icon.ico",
      "target": "nsis"
    },
    "nsis": {
      "oneClick": true,
      "perMachine": false,
      "allowElevation": false
    }
  },
  "scripts": {
    "start": "NODE_ENV=development ./node_modules/.bin/electron app",
    "build": "NODE_ENV=production ./node_modules/.bin/webpack",
    "watch": "NODE_ENV=development ./node_modules/.bin/webpack-dev-server --hot --inline",
    "dist": "sh build.sh && build -w --x64 --ia32"
 }'

On creating the executable, I can see asar.unpacked file and it contains the node-notifier module which has terminal, snore-test and notifu in it. But when I run the program, the notifications are not shown.

Can you suggest what is the correct method?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
m0o0scarcommented, Aug 30, 2018

Happens to me, too. When I use electron . to run the app on Mac, notification works fine. But after I pack it into a .app file with electron-builder, notification no longer work 😦

4reactions
mlinquancommented, Mar 21, 2019
"build": {
  "asarUnpack": [
    "./app/node_modules/node-notifier/**"
  ]
 }

not ./app/node_modules/node-notifier/vendor/**

and you must externals ‘node-notifier’ in your webpack config.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Electron Desktop Notifications not displaying on windows 10
I'm using electron-builder and it works like a charm. Electron multiplatform notifications. I uploaded this code to my GitHub repository.
Read more >
BrowserWindow
Window customization​. The BrowserWindow class exposes various ways to modify the look and behavior of your app's windows. For more details, see the...
Read more >
Publishing desktop apps on macOS|Fora Soft
Windows will notify the user that the developer is unknown and you're at risk. Do not scare your user with these messages, better...
Read more >
node-notifier-in-electron-vue
Without wait or timeout , notifications are just fired and forgotten. They don't wait for any response. To make notifications wait for a ......
Read more >
ElectronNET/community - Gitter
Hi all, may I know how to electronize build without creating the NSIS file? I only need the win-unpacked folder, with that can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found