© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developers•3mo ago•
1 reply
Hassan Z

Sharp or jimp libraries support in Workers?

Hello I am trying to deploy a hono app as worker. My app uses sharp but realised that it is not compatible. So i implemented jimp instead since it is JS native but still having issues deploying.

- [10021] Uncaught Error: Disallowed operation called within global scope. Asynchronous I/O (ex: fetch() or connect()), setting a timeout, and generating random values are not allowed within global scope. To fix this error, perform this operation within a handler. https://developers.cloudflare.com/workers/runtime-apis/handlers/
at index.js:51075:20 in runTimeout
at index.js:51162:13 in process2.nextTick
at index.js:40321:20
at index.js:40683:12 in 67../gif
at index.js:28991:25 in o
at index.js:28993:24
at index.js:41010:41 in 70../bitmapimage
at index.js:28991:25 in o
at index.js:28993:24
at index.js:65133:26
(https://developers.cloudflare.com/workers/observability/errors/#validation-errors-10021)
Cloudflare Docs
Handlers
Methods, such as
fetch()
fetch()
, on Workers that can receive and process external inputs.
Handlers
Cloudflare Docs
Errors and exceptions
Review Workers errors and exceptions.
Errors and exceptions
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Jimp and canvas on cloudflare workers
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
14mo ago
Bun support in Workers
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
3y ago
Static Assets Support in Workers
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
10mo ago
Support for inbound tcp in workers
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
4mo ago