node-notifier
node-notifier copied to clipboard
Notifications are not fired after making a windows executable using electron-builder
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?
Unsure about this, if you followed the instructions in the readme it should work fine. Possible either electron or we changed something and needs further testing.
Getting a similar issue on Windows 10 (Version 1607 OS Build 14393.0) with node-notifier v5.1.2 when packaged and distributed with electron-builder (^19.13.0). Electron version is ^1.6.11
The app is not in an asar.
The SnoreToast.exe is present at:
...\AppData\Local\Programs\myApp\resources\app\node_modules\node-notifier\vendor\snoreToast\SnoreToast.exe
Error: spawn
myApp\resources\app\build\vendor\snoreToast\SnoreToast.exe ENOENT
at exports._errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
The notifications seem to be working fine on OSX and on a Slackware 14.2 linux distro (kernel 4.4.14)
Is there any additional information I can provide to try track this down?
Can this be a issue with long paths (there are some issues on the filesystem for windows and long paths)? You can activate debug-mode and see what command node-notifier invokes internally and you can test that out directly.
I'm also having this issue happen for certain users. I haven't been able to figure out why it doesn't work for people.
@andrewchae @suku-h did you manage to solve this?
@damianobarbati I've had to stop using this package until this gets fixed.
Notifications are working for me after bumping node-notifier from version 5.1.2 to 5.2.1.
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 :(
Any update on this guys? I looked at the answer for when this happens but I am building to an nsis. On windows 10, "node-notifier": "^5.3.0",
Any update ?
"build": {
"asarUnpack": [
"./app/node_modules/node-notifier/**"
]
}
not ./app/node_modules/node-notifier/vendor/**
and you must externals 'node-notifier' in your webpack config.