-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
free(): invalid size #319
Comments
Probably a duplicate of #316 |
@bngmnn This should've been fixed in v2.2.17 @JeremyJames Can you share some of the images you're trying to compress ? I would like to debug. |
You are right, the problem is with a specific image. If I remove it, it works well in v2.2.17. Here's the culprit: Thanks for helping! |
We found the culprit in lovell/sharp#3935 (comment). Cache will be disabled in |
@JeremyJames Should be fixed in v2.2.19 |
Hello! I'm still getting the error. I did the following steps:
Thanks for the help |
I've recently noticed this as well with
|
I second @jurajkapsz. I first tried removing all images. Then I tried commenting out the only element I have. And then I didn't get any errors — but no pictures 😆 |
Can you share a bit of code on how you're running the |
compress({
Exclude: [(File: string) => File.indexOf("_image") !== -1],
}); And also does this 👆🏻 help ? compress({
Exclude: [
(File: string) => {
console.log(File);
return false;
},
],
}); And what is the output of 👆🏻 ? |
This is confirmed in my case. I got the same issue |
We don't compress in dev. |
Right, that's the interesting point, why it happens when In the meantime I've conditioned its integration in my integrations: [
import.meta.env.PROD &&
(await import("astro-compress")).default({
CSS: true,
HTML: true,
Image: true,
JavaScript: true,
SVG: true,
}),
], |
So, there's a |
Can you try the latest |
|
I get this error now:
|
@jurajkapsz it's a deprecated package. In the future only |
@kristianfrost I see, it seems that the integration must have an You can add it to your "dependencies": {
"@playform/compress-astro": "0.0.2"
}, to your See: https://github.com/Playform/CompressAstro#install-dependencies-manually Thank you for the tip! It will be re-added to the latest version. |
In reply to this comment:
No, it does not. Actually, to get the error, it seems, it is enough to just import the package into the astro config (I have In my
Nothing, I get the usual:
For me, this works fine (ie it does nothing on |
@jurajkapsz Hm, interesting.. |
It seems that importing two |
@jurajkapsz @enricogallesio @JeremyJames @bngmnn Can you give that a try with the latest |
No change after latest updates, the issue remains. |
Ok, there's one last resort I would like to try which might have been the culprit all this time https://github.com/Playform/Compress/blob/Current/Source/Function/Integration.ts#L203. Limiting / unlimiting the amount of memory used. I'll release a new version today with |
Same here, still having the same error |
I used the
Seems the As a workaround, overriding
|
|
This will be fixed by #329. You can track that issue there @c3qo. |
Hi @NikolaRHristov , I switched to NB, there is a new warning showing up: |
@jurajkapsz Yeah, I think it stems from the fact that If we import only where the As a hotfix, does the new method of importing export default {
integrations: [(await import("@playform/compress")).default()],
}; As for this:
I'll work on a solution.. |
I think I have it like that in my config as of now, so I don't think so. |
Does anyone have a fix for this issue? I'm still getting this:
|
Hi,
Even after upgrading to 2.2.17, I'm still having this issue. Any idea?
Thanks a lot
Astro v4.5.9
AstroCompress v2.2.17
The text was updated successfully, but these errors were encountered: