#
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.
#
Uncaught ReferenceError: require is not defined
at (index):1
Uncaught ReferenceError: module is not defined
at renderer.js:1
#
npm run dev
#
Solved excuse me
Please explain your solution for others (like myself) looking for the same.
I am also looking for this answer. I also need to upgrade NodeJS to latest version.
Answer is now in #855
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
hey @betterRunner check the answer here #855 and especially the last comment #855 (comment)
Most helpful comment
You should specify the following option in
src/main/index.jsfileYou can check my full answer here https://github.com/SimulatedGREG/electron-vue/issues/855#issuecomment-503002257