Uncaught ReferenceError: process is not defined
I found that many blogs just added
nodeIntegration: true,
1 and
still report this problem
Solution
# Add another line of
contextIsolation: false
1
2
# Complete code
const mainWindow = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
preload: path.join(__dirname,’preload.js’),
// nodeIntegration : true
nodeIntegration: true,
contextIsolation: false
}
})
Similar Posts:
- Uncaught type error: create-react-app and electronfs.existsSync is not a function
- Electronic error: Uncaught TypeError: Cannot read property ‘dialog’ of undefined
- Ffmpeg scaling — the solution of “width / height not divisible by 2”
- How to Solve Python SyntaxError: EOL while scanning string literal
- [Solved] echart Error: Can’t get dom width or height
- UICollectionView must be initialized with a non-nil layout parameter [Solved]
- A problem with 0 document. Documentelement. Clientwidth
- Next (react) framework combined with lib-flexible, postcss-pxtorem do pc-side rem adaptation to solve the font-size is always 54px issue
- [Solved] Nrm Error: internal validators.js 124 throw new ERR_INVALID_ARG_TYPE(name, ‘string’, value);
- This application failed to start because not Qt platform plugin could be initialized.