react-electron-browser-view
react-electron-browser-view copied to clipboard
Uncaught Error: Electron failed to install correctly
electron
9.0.5
react-electron-browser-view
: 3.0.0
export const WebContainer = () => {
return (
<div className="web-container">
<BrowserView
// Your source
src="https://www.google.com"
// Using events
onDidAttach={() => {
console.log("BrowserView attached");
}}
onUpdateTargetUrl={() => {
console.log("Updated Target URL");
}}
// Providing styling for the container element
style={{
height: 200,
}}
/>
</div>
);
}
leads to a totally blank application (nothing shows) and the following console error:
Uncaught Error: Electron failed to install correctly, please delete node_modules/electron and try installing again
at getElectronPath (index.js:14)
at Object.<anonymous> (index.js:18)
at Object.../node_modules/electron/index.js (index.js:18)
at __webpack_require__ (bootstrap:1558)
at fn (bootstrap:866)
at Object.../node_modules/react-electron-browser-view/lib/ElectronBrowserView.js (ElectronBrowserView.js:1)
at n (ElectronBrowserView.js:1)
at Module.<anonymous> (ElectronBrowserView.js:30)
at n (ElectronBrowserView.js:1)
at ../node_modules/react-electron-browser-view/lib/ElectronBrowserView.js (ElectronBrowserView.js:1)
This error appears only when <BrowserView />
is used.
delete node_modules/electron and try installing again
doesnt solve it.
I've tried instead WebView
from react-electron-web-view
and it works fine.
Now sure where my problem is... :/