question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Changing nodeIntegration to false breaks entire app

See original GitHub issue

I’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.

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
maximegriscommented, Aug 15, 2020

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.

0reactions
mastakillahBlitzarcommented, Jun 29, 2021

thank you!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found