electron is not a function
See original GitHub issueWhile I use vite-plugin-electron
with Vite offical template-vue-ts, getting the following errors.
使用vite 初始模板,在vite.config.ts中调用会报错
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
TypeError: window.require is not a function - Stack Overflow
require is not a function". Ironically require works only in main.js. Here the code Im trying to run: const electron = window.
Read more >process.electronBinding is not a function when using initialize ...
Example project. Shows the error. Change the electron version to 10.1. 2 and run npm i and npm start again and the error...
Read more >Solved window.require is not a function in Electron app - AWSM
Solved window.require is not a function in Electron app. I got this error when I recently tried to upgrade my Calculator which is...
Read more >Not working with electron react boilerplate - MDBootstrap
It is working in other boilerplates like create-react-app but not in the former one.</p> <p>Error :mdbreact.esm.js:918 Uncaught TypeError: Object(.
Read more >Using Preload Scripts - Electron
This guide will step you through the process of creating a barebones Hello World app in Electron, similar to electron/electron-quick-start.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can try remove
"type": "module"
inpackage.json
fix it.把
package.json
中的"type": "module"
去掉好吧,是我之前配项目的时候下意识认为 Electron 已经支持了
esm
了 后面通过针对 Electron 主进程的代码打成cjs
的方式解决了