Uncaught Error: No such module "__STATIC_CONTENT_MANIFEST".

Getting this error in deployment while the pages site is working fine on local.
Error: Failed to publish your Function. Got error: Uncaught Error: No such module "__STATIC_CONTENT_MANIFEST".
imported from "functionsWorker-0.3197352690414583.js"
Error: Failed to publish your Function. Got error: Uncaught Error: No such module "__STATIC_CONTENT_MANIFEST".
imported from "functionsWorker-0.3197352690414583.js"
No description
14 Replies
Cyb3r-Jak3
Cyb3r-Jak38mo ago
__STATIC_CONTENT_MANIFEST shouldn't be needed with Pages. Are you using workers sites?
Vikash [Agenty]
Vikash [Agenty]8mo ago
I was following this to server static CSS, JS etc. https://hono.dev/getting-started/cloudflare-workers#serve-static-files
Cloudflare Workers - Hono
Ultrafast web framework for Cloudflare Workers, Fastly Compute@Edge, Deno, Bun, Vercel, Lagon, Node.js, and others. Fast, but not only fast.
Vikash [Agenty]
Vikash [Agenty]8mo ago
It says to add bucket in wrangler.toml to serve static files [site] bucket = "./public"
Cyb3r-Jak3
Cyb3r-Jak38mo ago
Yeah that's not Pages, that's workers sites which is a different way of severing static assets and can't use Pages CI Don't know what your project looks like but I would recommend looking at the getting started guide of Pages (https://developers.cloudflare.com/pages/get-started/guide/_
Vikash [Agenty]
Vikash [Agenty]8mo ago
Deploy a Hono site · Cloudflare Pages docs
Hono is a small, simple, and ultrafast web framework for Cloudflare Pages and Workers, Deno, and Bun. In this guide, you will create a new Hono …
Vikash [Agenty]
Vikash [Agenty]8mo ago
Any suggestion, how to return the static assets. Like CSS, JS from /public directory
Cyb3r-Jak3
Cyb3r-Jak38mo ago
I don't work for Cloudflare, I am a volunteer. You linked hono for workers and you are using pages so the link should be https://hono.dev/getting-started/cloudflare-pages. Again, depending on your code, using workers sites can work but if your site has simple function logic then Pages is better and cheaper
Vikash [Agenty]
Vikash [Agenty]8mo ago
Here is my code -
No description
Cyb3r-Jak3
Cyb3r-Jak38mo ago
I mean that looks like it is better for worker's sites in which case you need to do wrangler deploy from your project directory and can't use Pages CI to deploy it. As well as remove the import { handle } from hono/cloudflare-pages. You are using two different projects that conflict with each other
Vikash [Agenty]
Vikash [Agenty]8mo ago
I am bit confused now, it was working perfectly fine until I started using the serveStatic function and Pages CI was deploying the app properly.
Cyb3r-Jak3
Cyb3r-Jak38mo ago
Because serveStatic is related to Cloudflare workers with workers sites, which can’t use Pages CI. Your code before that would have been all Cloudflare pages.
Vikash [Agenty]
Vikash [Agenty]8mo ago
Ok, noted the limit and moved my static assets to S3 removing serveStatic By the way, it must be super easier for your dev team to add this functionality in pages 🙂 I found another way used by some developers -
app.get("/public/*", async (ctx) => {
return await ctx.env.ASSETS.fetch(ctx.req.raw);
});
app.get("/public/*", async (ctx) => {
return await ctx.env.ASSETS.fetch(ctx.req.raw);
});
But for me, it throwing error - Can
Vikash [Agenty]
Vikash [Agenty]8mo ago
No description
Vikash [Agenty]
Vikash [Agenty]8mo ago
GitHub
sonicjs/src/server.ts at c626a284d00f1e9168ef952be8d52eef4cbbfd8f ·...
SonicJs Headless CMS - Blazinflg Fast Headless CMS built on Cloudflare Workers. 100% Javascript Based - lane711/sonicjs
Want results from more Discord servers?
Add your server
More Posts
globalThis.XMLHttpRequest is not a constructorI am trying to use `wrangler deploy` to deploy my app, but it keeps giving this error. I am not usinworker functions locally, but not when deployedIn production this code fails to retrieve data like 80% of the time. I added some debugging code to Issue with npx create-cloudflare-cli --template chatgpt-plugin <PROJECT_NAME>Hello cloudfare community, I've been trying to set up a new Cloudflare Workers project using the counable to add Pages custom domain when it includes ü: (Code: 8000000)Hi, I want to add the custom domain shop.züripeople.ch (shop.xn--zripeople-q9a.ch) to zpshop.pages.dHow to set `logpush=true` without `wrangler.toml`I use nuxt.js which automatically builds the app for cloudflare pages. This is great, however I do nSocket server inside of Sveltekit Pages appHey guys I'm building a sveltekit app with CF Pages, I need to make a websocket server for handling Turnstile captcha not workingalways invalid captcha when captcha is completed succesfully. I had this problem that it returned InUsing Durable Objects in Dev EnvironmentIn my `wrangler.toml` file I have this structure: ``` [env.dev] vars = { ENVIRONMENT = "dev" } [enAll websites in cloudflare account getting ratelimited incase of DDOS attackHi, I own multiple domains and manage multiple services for relatively small businesses / hobby projIs it a good idea to use static sites for images instead of cloudflare images?Is it a good idea to use static sites for images instead of cloudflare images?