Skip to content
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

electron and vite dependency error #15780

Closed
minyoung90 opened this issue May 2, 2023 · 1 comment
Closed

electron and vite dependency error #15780

minyoung90 opened this issue May 2, 2023 · 1 comment
Labels
area/cli bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite kind/bug 🐞 Qv2 🔝 Quasar v2 issues

Comments

@minyoung90
Copy link

What happened?

"npm install" gives me error with electron & vite project

What did you expect to happen?

"npm install" results no errors

Reproduction URL

https://codesandbox.io/s/epic-grass-zcrfne?file=/package.json

How to reproduce?

use below package.json

{
  "name": "test",
  "version": "0.0.1",
  "description": "A Quasar Project",
  "productName": "test",
  "author": "test@test.com",
  "private": true,
  "scripts": {
    "dev": "quasar dev",
    "build": "quasar build",
    "build:pwa": "quasar build -m pwa",
    "dev:electron": "quasar dev -m electron",
    "build:electron": "quasar build -m electron --win",
    "lint": "eslint --ext .js,.ts,.vue ./",
    "format": "prettier --write \"**/*.{js,ts,vue,scss,html,md,json}\" --ignore-path .gitignore",
    "test": "echo \"No test specified\" && exit 0",
    "prepare": "husky install"
  },
  "dependencies": {
    "@quasar/extras": "^1.0.0",
    "axios": "^0.21.1",
    "pinia": "^2.0.11",
    "quasar": "^2.6.0",
    "vue": "^3.0.0",
    "vue-i18n": "^9.2.2",
    "vue-router": "^4.0.0"
  },
  "devDependencies": {
    "@intlify/vite-plugin-vue-i18n": "^3.3.1",
    "@quasar/app-vite": "^1.0.0",
    "@types/node": "^12.20.21",
    "@typescript-eslint/eslint-plugin": "^5.10.0",
    "@typescript-eslint/parser": "^5.10.0",
    "autoprefixer": "^10.4.2",
    "electron": "^23.1.4",
    "electron-builder": "^23.6.0",
    "eslint": "^8.10.0",
    "eslint-config-prettier": "^8.1.0",
    "eslint-plugin-vue": "^9.0.0",
    "prettier": "^2.5.1",
    "typescript": "^4.5.4",
    "husky": "^8.0.0"
  },
  "engines": {
    "node": "^18 || ^16 || ^14.19",
    "npm": ">= 6.13.4",
    "yarn": ">= 1.21.1"
  }
}

Flavour

Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)

Areas

Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app-webpack | @quasar/app-vite)

Platforms/Browsers

Chrome, Electron

Quasar info output

Operating System - Linux(5.15.0-71-generic) - linux/x64
NodeJs - 16.19.0

Global packages
  NPM - 9.6.2
  yarn - Not installed
  @quasar/cli - 2.0.1
  @quasar/icongenie - Not installed
  cordova - Not installed

Important local packages
  quasar - 2.11.10 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
  @quasar/app-vite - 1.2.2 -- Quasar Framework App CLI with Vite
  @quasar/extras - 1.16.3 -- Quasar Framework fonts, icons and animations
  eslint-plugin-quasar - Not installed
  vue - 3.2.47 -- The progressive JavaScript framework for building modern web UI.
  vue-router - 4.1.6
  pinia - 2.0.35 -- Intuitive, type safe and flexible Store for Vue
  vuex - Not installed
  vite - 2.9.15 -- Native-ESM powered web dev build tool
  eslint - 8.39.0 -- An AST-based pattern checker for JavaScript.
  electron - 23.3.0 -- Build cross platform desktop apps with JavaScript, HTML, and CSS
  electron-packager - Not installed
  electron-builder - 23.6.0 -- A complete solution to package and build a ready for distribution Electron app for MacOS, Windows and Linux with “auto update” support out of the box
  register-service-worker - 1.7.2 -- Script for registering service worker, with hooks
  @capacitor/core - Not installed
  @capacitor/cli - Not installed
  @capacitor/android - Not installed
  @capacitor/ios - Not installed

Quasar App Extensions
  *None installed*

Relevant log output

please review changes in package.json
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @quasar/app-vite@1.2.2
npm ERR! Found: electron-builder@23.6.0
npm ERR! node_modules/electron-builder
npm ERR!   dev electron-builder@"^23.6.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional electron-builder@"^22.0.0" from @quasar/app-vite@1.2.2
npm ERR! node_modules/@quasar/app-vite
npm ERR!   dev @quasar/app-vite@"^1.0.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: electron-builder@22.14.13
npm ERR! node_modules/electron-builder
npm ERR!   peerOptional electron-builder@"^22.0.0" from @quasar/app-vite@1.2.2
npm ERR!   node_modules/@quasar/app-vite
npm ERR!     dev @quasar/app-vite@"^1.0.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Additional context

No response

@rstoenescu
Copy link
Member

Fix will be available in q/app-vite 1.4.0 and q/app-webpack 3.9.0
I haven't been able to reproduce it, but regardless improved dependency declaration.

Please note that your reproduction does not match your copy/pasted code. The reproduction repo uses the old q/app package (which is Webpack anyway).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite kind/bug 🐞 Qv2 🔝 Quasar v2 issues
Projects
None yet
Development

No branches or pull requests

2 participants