Next build succeeds but it fails to "find a module"?

I got a Next 13 app with Server components, everything was working fine and then I started getting errors on my builds (look at the last line)

...
09:57:35.704    - __next-on-pages-dist__/functions/api/[...path].func.js (esm)
09:57:35.864    ✨ Compiled Worker successfully
09:57:35.936    Found _routes.json in output directory. Uploading.
09:57:35.953    Validating asset output directory
09:57:36.741    Deploying your site to Cloudflare's global network...
09:57:38.765    Parsed 1 valid header rule.
09:57:40.268    Uploading... (31/45)
09:57:40.866    Uploading... (35/45)
09:57:41.007    Uploading... (40/45)
09:57:41.198    Uploading... (45/45)
09:57:41.199    ✨ Success! Uploaded 14 files (31 already uploaded) (1.52 sec)
09:57:41.199    
09:57:41.929    ✨ Upload complete!
09:57:43.783    Success: Assets published!
09:57:45.014    Error: Failed to publish your Function. Got error: Uncaught Error: No such module "opt/buildhome/repo/.vercel/output/static/_worker.js/index.js".
  imported from "bundledWorker-0.37093777238877634.mjs"
Was this page helpful?