Migrate From Vercel - NextJS App Router + API's

I tried using opennextjs-cloudflare to build and preiview my app but get the following 4 errors when running my preview command. opennextjs-cloudflare build && opennextjs-cloudflare preview:

Error: Build failed with 4 errors:
.open-next/server-functions/default/node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js:86:21: ERROR: No loader is configured for ".html" files: .open-next/server-functions/default/node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html
.open-next/server-functions/default/node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js:43:28: ERROR: Could not resolve "mock-aws-s3"
.open-next/server-functions/default/node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js:76:22: ERROR: Could not resolve "aws-sdk"
.open-next/server-functions/default/node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js:112:23: ERROR: Could not resolve "nock"


  • next.config.mjs invokes initOpenNextCloudflareForDev();
  • Added open-next.config.ts file with defineCloudflareConfig() invocation.
Was this page helpful?