Closed catcoal closed 1 year ago
There is no problem in the development stage, but after packaging, there is no error in the project packaging folder, but this error will be reported when the software is placed on the desktop
why?
"dependencies": { "mysql": "2.16.1", "redis": "4.6.5", "electron-reload": "^2.0.0-alpha.1", "electron-store": "^8.1.0", "element-plus": "2.2.32", "@element-plus/icons-vue": "^2.1.0", "vue": "3.2.45", "vue-router": "4.1.6" }, "devDependencies": { "@vitejs/plugin-vue": "^4.0.0", "electron": "^19.0.4", "electron-rebuild": "^3.2.9", "electron-builder": "^22.13.1", "vite": "^4.1.0" },
Uncaught (in promise) Error: Error invoking remote method 'actionModule': Error: Cannot find module 'electron' Require stack:
Is there anything else I need to provide?
const { contextBridge, ipcRenderer } = require('electron'); contextBridge.exposeInMainWorld('action', { module: (data) => ipcRenderer.invoke('actionModule', data) })
There is no problem in the development stage, but after packaging, there is no error in the project packaging folder, but this error will be reported when the software is placed on the desktop
why?