You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error [ERR_REQUIRE_ESM]: require() of ES Module E:\test\electron-vite-react-main\dist-electron\main\index.js from E:\test\electron-vite-react-main\node_modules\electron\dist\resources\default_app.asar\main.js not supported.
Describe the bug
Error [ERR_REQUIRE_ESM]: require() of ES Module E:\test\electron-vite-react-main\dist-electron\main\index.js from E:\test\electron-vite-react-main\node_modules\electron\dist\resources\default_app.asar\main.js not supported.
我克隆下来更新了一下package.json,下面是我的包版本,运行起来后报错上面那个错误,请问应该怎么处理?
node版本为v18.16.1
{
"name": "electron-vite-react",
"version": "2.2.0",
"main": "dist-electron/main/index.js",
"description": "Electron Vite React boilerplate.",
"author": "草鞋没号 [email protected]",
"license": "MIT",
"private": true,
"debug": {
"env": {
"VITE_DEV_SERVER_URL": "http://127.0.0.1:7777/"
}
},
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build && electron-builder",
"preview": "vite preview",
"pree2e": "vite build --mode=test",
"e2e": "playwright test"
},
"dependencies": {
"electron-updater": "6.1.7"
},
"devDependencies": {
"@playwright/test": "1.42.0",
"@types/react": "18.2.60",
"@types/react-dom": "18.2.19",
"@vitejs/plugin-react": "4.2.1",
"autoprefixer": "10.4.17",
"electron": "22.3.12",
"electron-builder": "24.12.0",
"postcss": "8.4.35",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tailwindcss": "^3.3.3",
"typescript": "5.1.6",
"vite": "5.0.10",
"vite-plugin-electron": "^0.28.0",
"vite-plugin-electron-renderer": "^0.14.5"
}
}
The text was updated successfully, but these errors were encountered: