freddy38510 / quasar-app-extension-ssg

Static Site Generator App Extension for Quasar.
MIT License
149 stars 17 forks source link

Failed to add extension due to workbox-build version #372

Closed renyuneyun closed 7 months ago

renyuneyun commented 7 months ago

When trying to add this extension to my project (quasar ext add ssg), I encounter the following error:

 App • Installing "ssg" Quasar App Extension

 App • Installing quasar-app-extension-ssg...
 App • [sync] Running "npm install --save-dev quasar-app-extension-ssg" in /home/ryey/coding/solid-fixer

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: solid-fixer@0.0.1
npm ERR! Found: workbox-build@7.0.0
npm ERR! node_modules/workbox-build
npm ERR!   peerOptional workbox-build@">= 6" from @quasar/app-vite@1.7.0
npm ERR!   node_modules/@quasar/app-vite
npm ERR!     dev @quasar/app-vite@"^1.7.0" from the root project
npm ERR!     peerOptional @quasar/app-vite@"^1.5.1" from quasar-app-extension-ssg@5.0.2
npm ERR!     node_modules/quasar-app-extension-ssg
npm ERR!       dev quasar-app-extension-ssg@"*" from the root project
npm ERR!   workbox-build@"7.0.0" from workbox-webpack-plugin@7.0.0
npm ERR!   node_modules/workbox-webpack-plugin
npm ERR!     peerOptional workbox-webpack-plugin@">= 6" from @quasar/app-webpack@3.12.0
npm ERR!     node_modules/@quasar/app-webpack
npm ERR!       peerOptional @quasar/app-webpack@"^3.10.1" from quasar-app-extension-ssg@5.0.2
npm ERR!       node_modules/quasar-app-extension-ssg
npm ERR!         dev quasar-app-extension-ssg@"*" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional workbox-build@"^6.6.0" from quasar-app-extension-ssg@5.0.2
npm ERR! node_modules/quasar-app-extension-ssg
npm ERR!   dev quasar-app-extension-ssg@"*" 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.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /home/ryey/.npm/_logs/2023-11-26T18_26_22_257Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /home/ryey/.npm/_logs/2023-11-26T18_26_22_257Z-debug-0.log

 App • ⚠  Command "npm" failed with exit code: 1

 App • ⚠   FAIL  Failed to install quasar-app-extension-ssg

It looks like a dependency version conflict, of workbox-build. I see there are PRs (by bot) to update that dependency, so probably that will resolve the issue?

Though, to be honest, I'm not sure why the webpack part is there, i.e. (excerpt from above):

npm ERR!   workbox-build@"7.0.0" from workbox-webpack-plugin@7.0.0
npm ERR!   node_modules/workbox-webpack-plugin
npm ERR!     peerOptional workbox-webpack-plugin@">= 6" from @quasar/app-webpack@3.12.0
npm ERR!     node_modules/@quasar/app-webpack
npm ERR!       peerOptional @quasar/app-webpack@"^3.10.1" from quasar-app-extension-ssg@5.0.2

I'm using Vite, and the previous message also says vite, but for some reason it is installing dependency for webpack well.

freddy38510 commented 7 months ago

The fix is available in quasar-app-extension-ssg@5.1.0

Please, let me know if you have any issues.

renyuneyun commented 7 months ago

Thanks. I have tested it just now, and adding SSG works. However, when trying to build static pages, there are errors. I'll open another issue as it's a different one.