-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nuxt dev mode do not stop on app quit #54
Comments
UPD: package.json {
"name": "hse-app-desktop",
"private": true,
"scripts": {
"build": "nuxt build --prerender && electron-builder",
"dev": "nuxi dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"devDependencies": {
"@nuxt/devtools": "latest",
"electron": "^27.0.2",
"electron-builder": "^24.6.4",
"nuxt": "^3.8.0",
"nuxt-electron": "^0.6.0",
"sass": "^1.69.5",
"vite-plugin-electron": "^0.14.1",
"vite-plugin-electron-renderer": "^0.14.5",
"vite-plugin-vuetify": "^1.0.2",
"vue": "^3.3.7",
"vue-router": "^4.2.5"
},
"main": "dist-electron/index.js",
"version": "0.0.1",
"dependencies": {
"@mdi/font": "^7.3.67",
"vuetify": "^3.3.23"
}
}
|
Note: quickstart project with following packagfe versions also do not stop nuxt dev server with electron app.quit()/app.exit() {
"name": "nuxt-electron-quick-start",
"version": "0.0.0",
"private": true,
"author": "草鞋没号 <[email protected]>",
"license": "MIT",
"main": "dist-electron/main.js",
"scripts": {
"dev": "nuxi dev",
"build": "nuxi build --prerender && electron-builder"
},
"dependencies": {},
"devDependencies": {
"electron": "^27.0.2",
"electron-builder": "^24.6.4",
"nuxt": "^3.6.3",
"nuxt-electron": "^0.6.0",
"vite-plugin-electron": "^0.14.1",
"vite-plugin-electron-renderer": "^0.14.5"
}
} Old project with following versions works good {
"name": "HSEAppXWin",
"private": true,
"scripts": {
"build": "nuxt build --prerender && electron-builder",
"dev": "set DEV_URL=http://localhost:3001/&&set scrtk=hseDummyKeyLol&&nuxt dev",
"generate": "nuxt generate && electron-builder",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"devDependencies": {
"@mdi/font": "^7.2.96",
"@types/electron": "^1.6.10",
"@types/jsonwebtoken": "^9.0.3",
"@types/node": "^18",
"electron": "^26.2.2",
"electron-builder": "^24.6.4",
"nuxt": "^3.4.3",
"vite-electron-plugin": "^0.8.2",
"vite-plugin-electron-renderer": "^0.14.1",
"vite-plugin-vuetify": "^1.0.2"
},
"dependencies": {
"@vee-validate/nuxt": "^4.9.0",
"@vueuse/nuxt": "^10.1.2",
"electron-store": "^8.1.0",
"jsonwebtoken": "^9.0.2",
"keytar": "^7.9.0",
"nuxt-electron": "^0.4.5",
"sass": "^1.62.1",
"vuetify": "^3.2.2"
},
"main": "dist-electron/electron/main.js",
"version": "1.1.2",
"build": {
"icon": "./build/icon.png"
}
}
|
app.on('window-all-closed', () => {
if (platform !== 'darwin') {
app.quit();
}
process.kill(process.pid, 'SIGTERM'); // add this
}) this work for me |
Hey @dvwzj, huge thanks for your reply! Do u use process.kill in production mode too, or only for dev mode? |
[email protected] supports use |
Hey, @yejimeiming, huge thanks for your reply, your advice partly fixed my problem, looking forward for vite-plugin-electron support tree-kill natively! Closing issue. |
Reopening, installing tree-kill didn't help, console process is still up when i close window in dev mode(if i don't send SIGKILL manually) |
You can upgrade to |
When i press 'x' in window nuxt dev mode just stays in console
app code
window creation code
EDIT: Did some reseach dsown in comments, trying to figure out what exactly causes the issue
UPD 2: crutch-fix, but works fine
The text was updated successfully, but these errors were encountered: