Error while Deploying to Cloudflare's global network

What is the name of the domain?

proxyai.tech

What is the error number?

[ERROR] The entry-point file at “.open-next/worker.js” was not found.

What is the error message?

✘ [ERROR] The entry-point file at “.open-next/worker.js” was not found.

What is the issue you’re encountering

While I was deploying my Next.js 15 application on Cloudflare workers using Open-next adapter, I got an error while deploying to Cloudflare’ global network, The error message is: ✘ [ERROR] The entry-point file at “.open-next/worker.js” was not found.

What steps have you taken to resolve the issue?

This is my wrangler.jsonc:

{
“$schema”: “node_modules/wrangler/config-schema.json”,
“main”: “.open-next/worker.js”,
“name”: “proxy”,
“compatibility_date”: “2025-03-25”,
“compatibility_flags”: [
“nodejs_compat”,
“global_fetch_strictly_public”
],
“assets”: {
“directory”: “.open-next/assets”,
“binding”: “ASSETS”
}
}

This is the open-next.config.ts:
import { defineCloudflareConfig } from “@opennextjs/cloudflare”;
import staticAssetsIncrementalCache from “@opennextjs/cloudflare/overrides/incremental-cache/static-assets-incremental-cache”;

export default defineCloudflareConfig({
incrementalCache: staticAssetsIncrementalCache,
});

I tried everything still nothing worked.

Screenshot of the error

Hi,

Have you made sure that the .open-next/worker.js exists in the folder?

Do I need to externally create a .open-next/worker.js file. I think it is created while the building process takes place. And also .open-next is added in .gitignore. If I need to create a .open-next/worker.js file, then what to write inside it.

My app consists of AI Streaming apis and also a bunch of other apis for integration. So should it be deployed in Cloudflare workers or pages

Facing the exact same problem. The .open-next must be added to .gitignore so that it is not present on my Github repository. The folder and its content are generated when deploy is run. Unless there is a way around, we cant use Cloudflare build connected to Github for NextJS apps.

I was able to solve this by using pnpm run deploy instead of npx wrangler deploy for my project build configuration within Cloudflare.

6 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.