Lolo
Lolo

Reputation: 133

Issue with node-notifier module

I'm working on a NodeJS/Electron/Angular app and I am using the node-notifier module. Every things work correctly but at the bottom of my notification message I have an inappropriate "toast" string. It only happens when I use the "icon" property. What should I do to remove that string ? Thanks in advance.

const notifier = SystemJS._nodeRequire('node-notifier');
notifier.notify({
title: 'Example of a notification',
message: 'Message of the notification',
icon: `${APP_ROOTDIR}/shared/assets/images/new-notification-icon.png`,
timout: 5}, () => { });

PS : My operating system is Windows 10 and this is a screenshot of the notification : Screenshot of the notification

Upvotes: 3

Views: 2995

Answers (1)

Sravan
Sravan

Reputation: 2019

Try the following code and let me if this works out for you, it worked fine for me. The default timeout period is 5 seconds.

const notifier = require('node-notifier');
notifier.notify({
    'title': 'My notification',
    'message': 'Hello, there!',
    'icon': '/home/xxx/Desktop/icon.jpg'
});

Here's the output:

enter image description here

Upvotes: 1

Related Questions