Changing nodeIntegration to false breaks entire app
See original GitHub issueI’m trying to use your template but when I change nodeIntegration
to false
and run the app, an error is thrown in the console and doesn’t load.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
node.js - Electron window.require is not a function even with ...
Another implication is that require() cannot be used in the renderer process unless nodeIntegration is true and contextIsolation is false.
Read more >Breaking Changes | Electron
In Electron 20, this default has changed. Beginning in Electron 20, renderers will be sandboxed by default, unless nodeIntegration: true or sandbox: false...
Read more >Start a new Electron app with React and Typescript.
Replies for: Once I set nodeIntegration: false, I get this error: external "url":1 Uncaught ReferenceError: require is not defined at Object.url (externa.
Read more >Interop's Labyrinth: Sharing Code Between Web & Electron ...
We gave our remote web app full access to Node, and Node is extremely powerful. ... path/to/preload/script.js', nodeIntegration: false, contextIsolation: ...
Read more >Using NodeJS APIs in Electron with React - Ryosuke
As someone who has built Electron apps before, I thought I knew how ... changing import to require , or update my Webpack...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The trick is done in
angular.webpack.js
file.By default, it sets the target to
electron-renderer
which is needed to run the compiled Electron app (when assets are on file system or during tests)Target has to be changed to
web
when you run the app in web context. There was an issue when nodeIntegration is set to false.thank you!