Most (not all) of the images on our site are broken
This started today when we ran a build/deploy. There weren’t any code changes. We use Strapi on the back end, which I initially thought was the problem, but somebody just made a few text changes and triggered a build. I tried building a preview version of the site that pulls from our strapi dev, which hasn’t been touched, and the same thing happened.
In the browser console, we’re getting these errors.
Having the same issue. Just started today. Images are broken on all new builds. Images on old builds look fine. Checked the logs and getting this:
Nov 14, 02:46:25 PM: 2cef8a3a ERROR Invoke Error {"errorType":"TypeError","errorMessage":"(0 , fs_1.default) is not a function","stack":["TypeError: (0 , fs_1.default) is not a function"," at loadSourceImage (/var/task/node_modules/@netlify/ipx/dist/http.js:128:34)"," at async handler (/var/task/node_modules/@netlify/ipx/dist/index.js:132:64)"]}
{
"errorType": "TypeError",
"errorMessage": "(0 , fs_1.default) is not a function",
"stack": [
"TypeError: (0 , fs_1.default) is not a function",
" at loadSourceImage (/var/task/node_modules/@netlify/ipx/dist/http.js:128:34)",
" at async handler (/var/task/node_modules/@netlify/ipx/dist/index.js:132:64)"
]
}
If they’re not using a release, but just the latest commit to the main branch, then the line would be here (no changes to that file since v1.4.5):
Either way, looks like unstorage@^1.0.0 is resolving to 1.9.0, according to yarn.lock, which also shows that Yarn 1 is being used – whoa, kickin’ it old school!
I opened a support ticket around 3:06pm PT, I received a response at 4:27pm PT:
We’re investigating it right now. We don’t have a reproduction case but think we might have fixed it. Would you be able to re-deploy your site and let us know if you still see the problem?
I redeployed, but the issue persists.
5:10pm, was asked to try again, the issue persists. Apparently they’ve resolved it for others, maybe my setup is funky in some way. Wouldn’t be surprising, just migrated the affected site to Netlify today.
That’s great! I created a new site from scratch (pnpm create t3-app@latest), added an image using next/image, and I didn’t encounter the issue (image loaded fine using , so there must be something unusual with the migrated repo. If I figure it out, I’ll share here, just in case someone stumbles across this thread in the future. However I’m triggering it, would be ideal to have a more useful error.