Closed azat-io closed 3 months ago
Same here, possibly related: #330
It stems from https://ptb.discord.com/channels/830184174198718474/1197638002764152843/1215607292792414228, somewhere in the dependency tree there are two different versions of astro
being used.
This is a potential fix for it - https://github.com/PlayForm/Compress/issues/329 since it will adjust the versions accordingly.
I ran into this problem when upgrading from Astro 4.6.3 to 4.9.1.
Doing npm explain astro
showed me that an older version of Astro is brought in by @playform/compress
:
astro@"4.8.1" from @playform/compress@0.0.4
@NikolaRHristov I wonder if it comes from locking the astro peer dependency to a fix version?
https://github.com/PlayForm/Compress/blob/Current/package.json#L57
@bennycode This is the new change it will be released shortly. The previous version had astro
in the dependencies
key this is why it was erroring. See https://github.com/PlayForm/Compress/issues/329#issuecomment-2126798109
Sure! Happy to test. I tried to install it but it gives me this error:
npm i @playform/compress
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: @typescripttv/website@2.0.0
npm ERR! Found: @playform/document@0.0.6
npm ERR! node_modules/@playform/document
npm ERR! peerOptional @playform/document@"0.0.6" from @playform/build@0.0.9
npm ERR! node_modules/@playform/build
npm ERR! peerOptional @playform/build@"0.0.9" from @playform/compress@0.0.6
npm ERR! node_modules/@playform/compress
npm ERR! @playform/compress@"*" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional @playform/document@"0.0.7" from @playform/compress@0.0.6
npm ERR! node_modules/@playform/compress
npm ERR! @playform/compress@"*" 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.
Looks like problem was fixed in v0.0.6 👍 My package manager is pnpm.
@bennycode Thank you ! I was able to reproduce. As a hotfix I can offer you to place an .npmrc
file in the project root with the following contents:
legacy-peer-deps=true
I was using it with this big .npmrc
file that always auto corrects these issues. Will look into it.
The type errors are now fixed on my end, thank you.
The same problem after updating Astro to v4.10.0. Can you reopen the issue?
Oy, yeah this popped back up for me as well in Astro 4.10.0.
There's a pull tracking this for anyone following https://github.com/PlayForm/Compress/pull/370/files
Fixed again in v0.0.12 for me, thank you!
Hi. I have a problem with types after upgrading the plugin to version 0.0.4.
Here is a part of
astro.config.ts
:I get the following error: