node-notifier: node-notifier doesn't work in Windows 10 (appID issue?)

I’m trying to use node-notifier in a simple expressjs project running on Windows 10 (Webstorm IDE). The code is plain and simple, taken from the README:

const notifier = require('node-notifier');
notifier.notify('Message');

Whatever I did - not a single message pops up. I tried to google it up, and it seems that I have to include an appID attribute - but I have no idea how to retrieve it (should it be for WebStorm? Command window?). Configuring it manually in the package.json doesn’t work as well.

I’d appreciate any help. Thanks in advance!

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (2 by maintainers)

Most upvoted comments

Refused to work after updating to Windows 10 1903 verstion

No, but there were no sounds before. Anyway, I turned them off through the notification settings in Windows.

In my testing tonight (possible I’m missing something), but it looks like it works consistently if you provide the wait option. Something like:

const notifier = require('node-notifier')

notifier.notify({
  message: 'message',
  wait: true
})

That causes the notification to wait for ~10 seconds, but ensures it pops up. If you’re still having issues with notifications not working on windows, throw this line before your notification: process.env.DEBUG="notifier" and make sure to include at least the [notifier options] that it prints out and the name of the .exe file that it is using (you’ll probably want to avoid putting the entire path to the .exe, but that’s up to you).

Sidenote: It does look like there’s a new version of SnoreToast (the exe file used for windows), 0.6.0 that we should probably update to. It looks like that version always waits (they took away the option in this commit. I’m not familiar enough with the library yet to know how to update to that version of the exe file, so we’ll have to wait for @mikaelbr to chime in.

I’m seeing the same thing as @peshkov3. After an update to Windows 10 1903, notifications stopped popping up. They do show up as notifications in the notification area after a reboot.

After I updated the SnoreToast.exe in ./vendor/snoreToast to v0.6.0, I can confirm that it works again. The wait behavior is now default, as @jnielson94 noticed.

Don’t forget to remove the wait parameter or you will only get the usage output from SnoreToast 🙂 That parameter should be removed in future release of node-notifier.

Edit: Haven’t seen this commit: https://github.com/mikaelbr/node-notifier/commit/ae9f88cb176965ecacfe6345220699d016746ef0

wait fixes the issue for me, but it will be great if it’s fixed in the module,

Honestly, I don’t know: https://github.com/mikaelbr/node-notifier/pull/134. But comparing file sizes it looks like x86.

Not working for me either on Windows 10. Tried from PowerShell terminal under VScode and direct in a command prompt window. No errors are produced.