PlayForm / Compress

🗜️ Compress —
https://NPMJS.Org/@playform/compress
MIT License
479 stars 12 forks source link

Playform Compress installation fails with Astro 4.9.2 #366

Closed Boston343 closed 3 months ago

Boston343 commented 3 months ago

When running npx astro add @playform/compress or npm install -D -E @playform/compress, the installation fails on Astro 4.9.2 with the following error message:

 Command failed with exit code 1: npm install @playform/compress@^0.0.8
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @playform/compress@0.0.8
npm ERR! Found: astro@4.9.2
npm ERR! node_modules/astro
npm ERR!   astro@"^4.9.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional astro@"4.9.1" from @playform/compress@0.0.8
npm ERR! node_modules/@playform/compress
npm ERR!   @playform/compress@"^0.0.8" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: astro@4.9.1
npm ERR! node_modules/astro
npm ERR!   peerOptional astro@"4.9.1" from @playform/compress@0.0.8
npm ERR!   node_modules/@playform/compress
npm ERR!     @playform/compress@"^0.0.8" 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.

Steps for minimal reproduction

  1. Create a new Astro project with npm create astro@latest
  2. Add @playform/compress with npx astro add @playform/compress
  3. See error message

Thoughts on why this is happening

The previous version I was using was 0.0.4 and it did not have this issue. Looking at the package.json file, 0.0.8 has a peer dependency on Astro 4.9.1 which I'm guessing doesn't need to be there

Other tech info

npm version: 10.5.2 (10.8.0 has the same message though) OS: windows 11

NikolaRHristov commented 3 months ago

@Boston343 Should be fixed in the latest astro-compress v2.2.26 and @playform/compress v0.0.10

Boston343 commented 3 months ago

Yep it seems to be fixed now, thanks!