You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we tried to use this plugin in an Angular app packaged using Electron. When trying to use notifications, I received this warning:
You tried to use electron-windows-notifications, but you're not running Windows 10, 8.1, or 8. No operations will be performed.
This is because Angular also declares a global variable "process". In this line, the process variable is the Angular one, not the Node one, so process.platform is undefined and it thinks the environment isn't Windows.
I was able to fix this by adding this line to the start of index.js:
const process = require('process')
I'm not sure if this is the best approach to fix the issue, so I prefer opening an issue instead of sending a PR.
The text was updated successfully, but these errors were encountered:
Hi,
we tried to use this plugin in an Angular app packaged using Electron. When trying to use notifications, I received this warning:
This is because Angular also declares a global variable "process". In this line, the process variable is the Angular one, not the Node one, so process.platform is undefined and it thinks the environment isn't Windows.
I was able to fix this by adding this line to the start of index.js:
const process = require('process')
I'm not sure if this is the best approach to fix the issue, so I prefer opening an issue instead of sending a PR.
The text was updated successfully, but these errors were encountered: