From d304e7e86343da3bcb93e9548cdf98df824d2f3b Mon Sep 17 00:00:00 2001 From: lezi-fun <177434121+lezi-fun@users.noreply.github.com> Date: Tue, 11 Aug 2026 18:00:03 +0800 Subject: [PATCH] fix: remove OpenNext dev hook from next.config (spawns workerd in build) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit initOpenNextCloudflareForDev() runs when next.config.js loads → spawns workerd binary (missing in Docker/node:20-alpine) → build crashes with ENOENT. The hook is only for opennextjs-cloudflare preview (dev); production build/deploy doesn't need it. --- next.config.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/next.config.js b/next.config.js index e0b2545..fd70d1d 100644 --- a/next.config.js +++ b/next.config.js @@ -13,5 +13,3 @@ const nextConfig = { }; module.exports = nextConfig; - -import('@opennextjs/cloudflare').then(m => m.initOpenNextCloudflareForDev());