I'm trying to open a link from an electron app (using angular) on my default browser but I receive the following error:
Uncaught TypeError: fs.existsSync is not a function
at Object.<anonymous> (vendor.bundle.js:160955)
at Object../node_modules/electron/index.js (vendor.bundle.js:160961)
at __webpack_require__ (inline.bundle.js:55)
at Object../src/app/components/issue/issue.component.ts (main.bundle.js:159)
at __webpack_require__ (inline.bundle.js:55)
at Object../src/app/app.module.ts (main.bundle.js:75)
at __webpack_require__ (inline.bundle.js:55)
at Object../src/main.ts (main.bundle.js:644)
at __webpack_require__ (inline.bundle.js:55)
at Object.0 (main.bundle.js:662)
I've got a "(click)="onNavigate()"" on a button on my html component and this is the function:
import { shell } from 'electron';
...
onNavigate() {
shell.openExternal("http://www.google.com");
}
...
I have no idea what I am doing wrong and hope someone here can help me :)