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

Updated template dep version #32

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

franciscop
Copy link
Contributor

Description

When following the official guide, there seems to be a bug where the dependency has an incorrect peer dependency requirement:

$ npm create @vite-pwa/pwa@latest [omitted] -- --template react
Need to install the following packages:
@vite-pwa/[email protected]
Ok to proceed? (y) 


> npx
> create-pwa [omitted] --template react

✔ PWA Name: … [omitted]
✔ PWA Short Name: … [omitted]
✔ PWA Description: … [omitted]
✔ Theme color: … #bb99ff
✔ Select a strategy: › generateSW
✔ Select a behavior: › Auto update
✔ Enable periodic SW updates? … no / yes
✔ Show offline ready prompt? … no / yes
✔ Generate PWA Assets Icons on the fly? … no / yes

Scaffolding project in /Users/[omitted]...

Done. Now run:

  cd [omitted]
  npm install
  npm run dev

$ cd [omitted]
$ npm i
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [omitted]@0.0.0
npm error Found: [email protected]
npm error node_modules/vite
npm error   dev vite@"^6.0.11" from the root project
npm error
npm error Could not resolve dependency:
npm error peer vite@"^3.1.0 || ^4.0.0 || ^5.0.0" from [email protected]
npm error node_modules/vite-plugin-pwa
npm error   dev vite-plugin-pwa@"^0.20.0" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /Users/[omitted]/_logs/2025-02-09T12_07_34_470Z-eresolve-report.txt
npm error A complete log of this run can be found in: /Users/[omitted]/_logs/2025-02-09T12_07_34_470Z-debug-0.log

Thank you for contributing to vite-pwa/create-pwa!
----------------------------------------------------------------------->

Linked Issues

Fixes vite-pwa/vite-plugin-pwa#800

Additional Context

I was debugging a sharp bug and tried to install with @vite-pwa a new project from scratch, and couldn't do that due to this bug. I still cannot fully test this PR since I still get the sharp issue, but that seems to be an issue from my system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dependency error on vite 6
1 participant