There is an error using the remote module:
Uncaught Error: @electron/remote is disabled for this WebContents. Call require("@electron/remote/main").enable(webContents) to enable it. at IpcMainImpl.<anonymous>
according to the prompt, you need to add a line: require(“@electron/remote/main”).enable(webContents) in main.js, but if it is added directly, the webcontents is not defined error will be displayed.
You can’t add it directly, webContents should be preceded by the defined variable name, as follows, webContents should be replaced with mainWindow.webContents.
Read More:
- [Solved] electron Use remote Error: Cannot read properties of undefined (reading ‘BrowserWindow‘)
- [Solved] electron Error: Uncaught TypeError: Cannot read property ‘BrowserWindow‘ of undefined
- [Solved] electron-vue project error: Object.fromEntries is not a function electron-vue
- How to Solve electron import page Error
- [Solved] electron Package and Startup Error: Error: ENOENT: no such file or directory, open ‘xxx/manifest.json‘‘
- [Solved] Uncaught ReferenceError: axios is not defined
- ArcGIS API for JavaScript Error Uncaught(in promise): TypeError: xxx is not a constructor
- [Solved] electron project Package Error: spawn exe\dll ENOENT
- [Solved] Uncaught DOMException: Failed to execute ‘readAsDataURL‘ on ‘FileReader‘: The object is already busy
- [Web Browser] “Uncaught TypeError: object is not a function“
- [Solved] Vue Route Error: Uncaught TypeError: (0 , vue__WEBPACK_IMPORTED_MODULE_42__.defineComponent) is not a function
- [Solved] Uncaught (in promise) TypeError: XXX.a is not a constructor
- [Solved] Vue Error: Uncaught TypeError: Vue.createApp is not a function
- JS async await Error: Uncaught SyntaxError: await is only valid in async functions and the top level bodies of modules
- [Solved] Vue3 process Error: Uncaught ReferenceError: process is not defined
- [Solved] Uncaught SyntaxError: Cannot use import statement outside a module
- [Solved] Uncaught SyntaxError: Invalid Unicode escape sequence
- [Solved] Uni.createintersectionobserver Error: Uncaught TypeError: Cannot read property ‘bottom’ of null
- [Solved] Uncaught SyntaxError: The requested module does not provide an export named
- [error] IDE service port disabled. To use CLI Call, please enter y to confirm enabling CLI capabilit