electron-vite-react
electron-vite-react copied to clipboard
[Help] Failed preload + window.ipcRenderer is undefined
On initialization (using yarn install
and yarn run dev
), I receive a sequence of errors:
VM123 sandbox_bundle:2 Unable to load preload script: /Users/aerypro/git/acwms-electron/dist-electron/preload/index.mjs
Error: ENOENT: no such file or directory, open '/Users/aerypro/git/acwms-electron/dist-electron/preload/index.mjs'
chunk-PP72ARUD.js?v=6603f438:16657 Uncaught TypeError: Cannot read properties of undefined (reading 'on')
at index.tsx:89:24
at commitHookEffectListMount (chunk-PP72ARUD.js?v=6603f438:16902:34)
at commitPassiveMountOnFiber (chunk-PP72ARUD.js?v=6603f438:18150:19)
at commitPassiveMountEffects_complete (chunk-PP72ARUD.js?v=6603f438:18123:17)
at commitPassiveMountEffects_begin (chunk-PP72ARUD.js?v=6603f438:18113:15)
at commitPassiveMountEffects (chunk-PP72ARUD.js?v=6603f438:18103:11)
at flushPassiveEffectsImpl (chunk-PP72ARUD.js?v=6603f438:19484:11)
at flushPassiveEffects (chunk-PP72ARUD.js?v=6603f438:19441:22)
at chunk-PP72ARUD.js?v=6603f438:19322:17
at workLoop (chunk-PP72ARUD.js?v=6603f438:195:42)
and a bunch of other errors that start with a failed preload. How to address?
Full logs: