Error: `sharp is required to be installed for image optimization`

Error: 'sharp' is required to be installed in standalone mode for the image optimization to function correctly. Read more at: https://nextjs.org/docs/messages/sharp-missing-in-production
Error: socket hang up
at connResetException (node:internal/errors:720:14)
at Socket.socketOnEnd (node:_http_client:519:23)
at Socket.emit (node:events:526:35)
at endReadableNT (node:internal/streams/readable:1376:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'ECONNRESET'
}
Error: socket hang up
at connResetException (node:internal/errors:720:14)
at Socket.socketOnEnd (node:_http_client:519:23)
at Socket.emit (node:events:526:35)
at endReadableNT (node:internal/streams/readable:1376:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'ECONNRESET'
}
Error: 'sharp' is required to be installed in standalone mode for the image optimization to function correctly. Read more at: https://nextjs.org/docs/messages/sharp-missing-in-production
Error: socket hang up
at connResetException (node:internal/errors:720:14)
at Socket.socketOnEnd (node:_http_client:519:23)
at Socket.emit (node:events:526:35)
at endReadableNT (node:internal/streams/readable:1376:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'ECONNRESET'
}
Error: socket hang up
at connResetException (node:internal/errors:720:14)
at Socket.socketOnEnd (node:_http_client:519:23)
at Socket.emit (node:events:526:35)
at endReadableNT (node:internal/streams/readable:1376:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'ECONNRESET'
}
Ran into this error, I suspect that the culprit is a *.png file I added as the image of one of my services, but the page won't load in order for me to remove it. Are tile details stored in the config file?
8 Replies
Serenaphic
Serenaphic16mo ago
Hi, yes the apps icons link are stored in the config files, the standard one is default.json, just do ctrl+f to search the app and under "iconUrl" remove the link after, make sure to keep the "" after
"iconUrl": "",
"iconUrl": "",
Make sure not to modify anything else as this can get very finicky
distrobyte
distrobyteOP16mo ago
Hmm, I see a default.json.bak file perhaps an auto rollback could be performed here? if a new configuration won't work in any case, that was the issue catching this problem can also possibly help
Serenaphic
Serenaphic16mo ago
This is a strange error to get though, could you provide us with the link to the image you were trying to use so we can try to reproduce the problem??
Manicraft1001
Manicraft100116mo ago
I think sharp is not working in the standalone runtime & docker img We do have the dependency, but the runtime doesn't work in the image for some reason. Issue is well known though We haven't invested much time into it. Img optimisation will just be disabled
distrobyte
distrobyteOP16mo ago
For what it's worth, I wasn't using the edge image, just :latest
distrobyte
distrobyteOP16mo ago
Manicraft1001
Manicraft100116mo ago
We are building for standalone deployment when creating the docker image :). So you do use the mentioned variant @tagaishi it has something to do with paths and the dependency not being recognised in standalone.
distrobyte
distrobyteOP16mo ago
Oh my apologies, duly noted! this specific logo isn't available on the fontawesome(?) or whatever registry of logos is used now in any case, glad I could flag it with ye
Want results from more Discord servers?
Add your server