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.

Upgrade electron to 5.0.0 beta fails

See original GitHub issue

Found an issue or bug with electron-vue? Tell me all about it!

# I was trying to upgrade the electron from 4.0.0 to 5.0.0 beta with yarn upgrade electron@beta, but the project raises errors when running npm run dev and the screen is blank.

Describe the issue / bug.

# Uncaught ReferenceError: require is not defined at (index):1 Uncaught ReferenceError: module is not defined at renderer.js:1

How can I reproduce this problem?

# npm run dev

If visual, provide a screenshot.

#

Tell me about your development environment.
  • Node version:v11.11.0
  • NPM version:6.9.0
  • vue-cli version: (if necessary)
  • Operating System:

If you are looking to suggest an enhancement or feature, then feel free to remove everything above.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

6reactions
zahergcommented, Jun 18, 2019

You should specify the following option in src/main/index.js file

    webPreferences: {
      nodeIntegration: true,
    }, 

You can check my full answer here https://github.com/SimulatedGREG/electron-vue/issues/855#issuecomment-503002257

0reactions
heronggencommented, Jun 19, 2019

hey @betterRunner check the answer here #855 and especially the last comment #855 (comment)

Read more comments on GitHub >

github_iconTop Results From Across the Web

electron 5.0.0 "Uncaught ReferenceError: require is not defined"
I upgraded to electron beta (5.0.0) because I needed a newer version of node and encountered this error message in my renderer process, ......
Read more >
Beta Releases | Electron
Electron 5.0.0 -beta.9 April 19, 2019 (4 years ago) ... Added missing module name to the exception message thrown when require fails in...
Read more >
electron - npm
The Electron framework lets you write cross-platform desktop applications using JavaScript, HTML and CSS. It is based on Node.js and ...
Read more >
electron 3.1.0-beta.2 vulnerabilities | Snyk
Upgrade electron to version 18.3.14, 19.1.0 or higher. ... that meet the conditions by causing them to fail their IsCanonical() check. ... <5.0.0-beta.1....
Read more >
electron-log | Yarn - Package Manager
Just a simple logging module for your Electron or NW.js application. No dependencies. No complicated configuration. Just require and use.
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