Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin not working in Angular apps: You tried to use electron-windows-notifications, but you're not running Windows 10, 8.1, or 8 #7

Open
dpalou opened this issue Jul 17, 2018 · 0 comments

Comments

@dpalou
Copy link

dpalou commented Jul 17, 2018

Hi,

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant