We faced the same issue after updating @netlify/plugin-nextjs, the problem seems to be since they switched to ipx
In our particular case we have a proxy so we needed to update our rules to include the new _ipx endpoint.
Another issue we faced was with the content-type of our resources, we used to return content-type: binary/octet-stream but they introduced this magnificent check here causing all our images to break, so we needed to adjust.
I hope this findings can help anyone having similar issues.
Hey folks, by reading the latest comments, I think the issue only occurs when trying to deploy from CLI, correct? Did I miss someone who is having this issue with deploying from Netlify Build pipeline? If so, please let me know.
About the CLI problem, it seems to be a little tough to handle. Node.js installs platform-specific binary for Sharp. So when you use in on devices other than Linux-based OSs, you’d face this problem as AWS Lambda runs Linux-based dependencies. So when you bundle from CLI, the macOS or Windows-specific dependency doesn’t work there and thus the issue.
We’d try to come up with a solution to tackle this, but I believe, at this point your options are:
Build using Netlify Build
Use some other Linux-based build system like GitHub Actions and publish the deploy to Netlify.
Thanks for that clarification! may I add that updating the docs is essential. After all, the stack of Next.js, Images, macOS and CLI deployment is pretty common IMO.
Thank you for chiming in. As mentioned before, this has been shared with the teams in charge, however having a solution in place is going to be difficult because there are multiple variables involved in this that are outside Netlify’s control. The team is still working to see if this can be worked around.
Just one thing I noticed that may be useful.
I don’t encounter the issue with SVG images. It doesn’t matter if it is a true SVG or if it’s simply a bitmap inside an SVG.
It might be a temporary and very dirty workaround for some, just putting it out there for the team to maybe see why some formats don’t have ipx error out as it might shed some light on the subject.
Thank you for your reply!
However, as far as I’m aware, that cannot be used to deploy to production.
About the issue, since the old logs are not available any more, could any one of you provide us with a recent reproduction? We want to confirm if the log messages are same as the previous issues to hopefully steer this in the right direction.