The entry-point file at ".open-next/worker.js" was not found
I am trying to deploy a Next.js project using the new OpenNext adapter.
I've followed all the steps in the guide aside from caching which I understand is optional
https://opennext.js.org/cloudflare/get-started
When I try to build this project as a new worker, I connect it to my GitHub project.
I leave the build command as the default "npm run build"
I leave the deploy command as the default "npx wrangler deploy"
I add my environment variables under "Build Variables".
Then I click Save and Deploy.
Everything goes well until the step "Deploying to Cloudflare's global network"
Where it fails with this error log:
✘ [ERROR] The entry-point file at ".open-next/worker.js" was not found.
What am I missing?
Get Started - OpenNext
Open-source Next.js adapters
1 Reply
Ok, just realized I needed to change the build command to npm run deploy