Cannot find module '__STATIC_CONTENT_MANIFEST' or its corresponding type declarations
I'm using Hono and I want to serve some static files with my Cloudflare worker. I followed the docs and added a worker-site bucket which is the place where my static files are stored, and my
index.ts
now looks like this:
However TypeScript says: Cannot find module '__STATIC_CONTENT_MANIFEST' or its corresponding type declarations.
How to solve this issue?2 Replies
Hi @PneuTueur I had the same issue, and got around it by ignoring the TypeScript error with a comment
https://github.com/jldec/presskit/blob/main/packages/worker/src/index.tsx#L21-L25 (It's not the most satisfying - please post back here if you find a better solution - e.g. in https://github.com/honojs/hono/issues/1127)
// @ts-expect-error
.https://github.com/jldec/presskit/blob/main/packages/worker/src/index.tsx#L21-L25 (It's not the most satisfying - please post back here if you find a better solution - e.g. in https://github.com/honojs/hono/issues/1127)
GitHub
Issues · honojs/hono
Web framework built on Web Standards. Contribute to honojs/hono development by creating an account on GitHub.
GitHub
presskit/packages/worker/src/index.tsx at main · jldec/presskit
https://presskit.jldec.me. Contribute to jldec/presskit development by creating an account on GitHub.
Thank you! it seems to be a bug from TS