Skip to content

[BUG] The entry-point file at ".open-next/worker.js" was not found. #573

@titouv

Description

@titouv

Describe the bug

When deploying default example with nothing else added got the following error

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

This default example command is from the docs

Here is the full logs

2025-04-13T15:48:59.999Z	Initializing build environment...
2025-04-13T15:49:06.733Z	Success: Finished initializing build environment
2025-04-13T15:49:07.552Z	Cloning repository...
2025-04-13T15:49:09.118Z	Detected the following tools from environment: npm@10.8.3, nodejs@22.9.0
2025-04-13T15:49:09.119Z	Installing project dependencies: npm install --progress=false
2025-04-13T15:50:48.536Z	
2025-04-13T15:50:48.536Z	added 842 packages, and audited 843 packages in 2m
2025-04-13T15:50:48.536Z	
2025-04-13T15:50:48.537Z	58 packages are looking for funding
2025-04-13T15:50:48.537Z	  run `npm fund` for details
2025-04-13T15:50:48.566Z	
2025-04-13T15:50:48.567Z	4 moderate severity vulnerabilities
2025-04-13T15:50:48.567Z	
2025-04-13T15:50:48.567Z	Some issues need review, and may require choosing
2025-04-13T15:50:48.567Z	a different dependency.
2025-04-13T15:50:48.567Z	
2025-04-13T15:50:48.567Z	Run `npm audit` for details.
2025-04-13T15:50:48.616Z	Executing user build command: npm run build
2025-04-13T15:50:48.943Z	
2025-04-13T15:50:48.943Z	> test-nextjs-cloudflare-workers-example@0.1.0 build
2025-04-13T15:50:48.943Z	> next build
2025-04-13T15:50:48.943Z	
2025-04-13T15:50:49.989Z	⚠ No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
2025-04-13T15:50:50.002Z	Attention: Next.js now collects completely anonymous telemetry regarding usage.
2025-04-13T15:50:50.003Z	This information is used to shape Next.js' roadmap and prioritize features.
2025-04-13T15:50:50.003Z	You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
2025-04-13T15:50:50.003Z	https://nextjs.org/telemetry
2025-04-13T15:50:50.003Z	
2025-04-13T15:50:50.138Z	   ▲ Next.js 15.2.5
2025-04-13T15:50:50.138Z	
2025-04-13T15:50:50.220Z	   Creating an optimized production build ...
2025-04-13T15:51:01.156Z	 ✓ Compiled successfully
2025-04-13T15:51:01.160Z	   Linting and checking validity of types ...
2025-04-13T15:51:04.399Z	   Collecting page data ...
2025-04-13T15:51:05.865Z	   Generating static pages (0/5) ...
2025-04-13T15:51:06.885Z	   Generating static pages (1/5) 
2025-04-13T15:51:06.886Z	   Generating static pages (2/5) 
2025-04-13T15:51:06.886Z	   Generating static pages (3/5) 
2025-04-13T15:51:06.886Z	 ✓ Generating static pages (5/5)
2025-04-13T15:51:07.519Z	   Finalizing page optimization ...
2025-04-13T15:51:07.519Z	   Collecting build traces ...
2025-04-13T15:51:17.027Z	
2025-04-13T15:51:17.031Z	Route (app)                                 Size  First Load JS
2025-04-13T15:51:17.031Z	┌ ○ /                                    5.57 kB         106 kB
2025-04-13T15:51:17.031Z	└ ○ /_not-found                            977 B         101 kB
2025-04-13T15:51:17.031Z	+ First Load JS shared by all             100 kB
2025-04-13T15:51:17.031Z	  ├ chunks/4bd1b696-5b6c0ccbd3c0c9ab.js  53.3 kB
2025-04-13T15:51:17.031Z	  ├ chunks/684-ce1ba0c508f42a52.js       45.3 kB
2025-04-13T15:51:17.035Z	  └ other shared chunks (total)          1.88 kB
2025-04-13T15:51:17.035Z	
2025-04-13T15:51:17.035Z	
2025-04-13T15:51:17.036Z	○  (Static)  prerendered as static content
2025-04-13T15:51:17.036Z	
2025-04-13T15:51:17.093Z	Success: Build command completed
2025-04-13T15:51:17.094Z	Executing user deploy command: npx wrangler deploy
2025-04-13T15:51:18.277Z	
2025-04-13T15:51:18.278Z	 ⛅️ wrangler 4.10.0
2025-04-13T15:51:18.278Z	-------------------
2025-04-13T15:51:18.278Z	
2025-04-13T15:51:18.285Z	
2025-04-13T15:51:18.346Z	✘ [ERROR] The entry-point file at ".open-next/worker.js" was not found.
2025-04-13T15:51:18.347Z	
2025-04-13T15:51:18.347Z	
2025-04-13T15:51:18.347Z	
2025-04-13T15:51:18.347Z	Cloudflare collects anonymous telemetry about your usage of Wrangler. Learn more at https://github.com/cloudflare/workers-sdk/tree/main/packages/wrangler/telemetry.md
2025-04-13T15:51:18.350Z	🪵  Logs were written to "/opt/buildhome/.config/.wrangler/logs/wrangler-2025-04-13_15-51-17_885.log"
2025-04-13T15:51:18.390Z	Failed: error occurred while running deploy command

Steps to reproduce

  1. Run the default example start command npm create cloudflare@latest -- my-next-app --framework=next --platform=workers and select Nextjs
  2. Deploy via git to cloudflare

Expected behavior

The default example should compile without any additional configuration

@opennextjs/cloudflare version

^1.0.0-beta.2

Wrangler version

^4.10.0

next info output

Using vars defined in .dev.vars
/bin/sh: yarn: command not found
/bin/sh: pnpm: command not found

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.3.0: Thu Jan  2 20:22:58 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T8132
  Available memory (MB): 16384
  Available CPU cores: 10
Binaries:
  Node: 23.11.0
  npm: 10.9.2
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 15.2.5 // There is a newer version (15.3.0) available, upgrade recommended!
  eslint-config-next: N/A
  react: 19.1.0
  react-dom: 19.1.0
  typescript: 5.8.3
Next.js Config:
  output: N/A
 ⚠ There is a newer version (15.3.0) available, upgrade recommended!
   Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue.
   Read more - https://nextjs.org/docs/messages/opening-an-issue

Additional context

No response

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions