Electron-vue: Bug Electron 5.0.0

Created on 25 Apr 2019  路  6Comments  路  Source: SimulatedGREG/electron-vue

updating to electron 5.0.0 occurs errors as shown below.
Note:
To install the final electro 5.0.0 it is necessary to install the packages before:

  • ajv-keywords
  • ajv

I've tried uninstalling and installing again, but to no avail!
So far I have returned to version 4.1.4 which is running smoothly.
npm i <a href="electron@latest">electron@latest</a>
electron debug app

Most helpful comment

mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: true,
nodeIntegrationInWorker: true,
webSecurity: false
}
})

All 6 comments

default value of webPreferences.nodeIntegration is false in Electron 5.0.0

so what you can do is set it to true in src/main/index.js

mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: true,
nodeIntegrationInWorker: true,
webSecurity: false
}
})

I have the same issue. Did you find a solution?

Hello.

I did it in my code as yaoleia commented.

It's work

mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: true,
nodeIntegrationInWorker: true,
webSecurity: false
}
})

Thanks

Hello.

I did it in my code as yaoleia commented.

It's work

mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: true,
nodeIntegrationInWorker: true,
webSecurity: false
}
})

Thanks

could u send me your package.json?

@serhii-cherednyk
in index.js
replace:

mainWindow = new BrowserWindow({
    height: 563,
    useContentSize: true,
    width: 1000
  })

with:

mainWindow = new BrowserWindow({
    height: 563,
    useContentSize: true,
    width: 1000,
    webPreferences: {
      nodeIntegration: true,
      nodeIntegrationInWorker: true,
      webSecurity: false
    }
  })
Was this page helpful?
0 / 5 - 0 ratings

Related issues

jt-wang picture jt-wang  路  3Comments

mvalim picture mvalim  路  4Comments

kinoli picture kinoli  路  3Comments

Quadriphobs1 picture Quadriphobs1  路  3Comments

Oriol-GG picture Oriol-GG  路  3Comments