WilliamMabotjaCS227
WilliamMabotjaCS227

Reputation: 97

Electron App not working properly, Console says 'require not defined'

I just wrote a small app that converts markdown to HTML automatically, but when I type in the text to convert, nothing happens. This is not the first time I am having this problem, an App I did previously for saving bookmarks would not activate some buttons.

Here is the screenshot

enter image description here

Upvotes: 0

Views: 44

Answers (1)

Inch High
Inch High

Reputation: 845

Please try:

const w = new BrowserWindow({ webPreferences: { nodeIntegration: true } })

The issue can be further explored here:

https://github.com/electron/electron/issues/17241

Essentially, the 'nodeIntegration' used to default to true. However the was introduced as a 'Breaking change' when moving to v5

Upvotes: 1

Related Questions