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.

window.require is not a function

See original GitHub issue

After updating the package from 1.4.0 to 1.5.1 I get the error window.require is not a function. Haven’t changed anything in my code.

Windows 10 Electron 8.2.4 Typescript 3.8.2

I just use TSC to compile to Javascript, not using Webpack or anything.

Looks like this commit is the culprit: https://github.com/hardchor/electron-redux/commit/a1ba87b107e36cfb0004ae0c5f5f07720d23e92b

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
hardchorcommented, Apr 30, 2020

Appreciate, just want to find a solution that works for everyone

1reaction
koenoecommented, Apr 30, 2020

@koenoe what happens when you set

new BrowserWindow({
  webPreferences: {
    nodeIntegration: true
  }
});

Can give it a try later to see what happens, but it wouldn’t be a safe solution 😔

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: window.require is not a function - Stack Overflow
Im trying to build an electron app and want to use window.require. Unfortunately the compiler says "TypeError: ...
Read more >
Solved window.require is not a function in Electron app - AWSM
I got this error when I recently tried to upgrade my Calculator which is developed in electron few years ago.
Read more >
Uncaught TypeError: window.require is not a function : r/sveltejs
I have been trying to build a web app with Svelte. However, when I try to require the fs module with window. require("fs")...
Read more >
Uncaught TypeError: window.require is not a function · Issue #62
I just cloned the repo, rolled back to Node 12.18.3, and ran npm rebuild . But when I run npm start I get...
Read more >
TypeError: require(...) is not a function in Node.js | bobbyhadz
To solve the "TypeError: require(...) is not a function", make sure to place a semicolon between your require call and an immediately invoked...
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