Run link in native browser from within React app



I’m hosting a React Application within Electron, using bundled app + html. I’m trying to open a URL in a external browser (default on OS). Normally, I’d use shell to do that, but I get the error that fs module cannot be found.

I assume this comes from the fact that I’m using electron just as a “Host” for a web app, so there’s no access to node API.

Is there a other way to “host” React app? How I’d have to approach this, to be able to open links in default browsers?



Have you got a link to the project?

Sounds like you’ve got node-integration turned off, but your React app is a bundled part of your app? shell and fs should work regardless of being a React app or not.