You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.
import{setupDevPlatform}from'@cloudflare/next-on-pages/next-dev';importcreateNextIntlPluginfrom'next-intl/plugin';constwithNextIntl=createNextIntlPlugin();// Here we use the @cloudflare/next-on-pages next-dev module to allow us to use bindings during local development// (when running the application with `next dev`), for more information see:// https://github.com/cloudflare/next-on-pages/blob/main/internal-packages/next-dev/README.mdif(process.env.NODE_ENV==='development'){awaitsetupDevPlatform();}/** @type {import('next').NextConfig} */constnextConfig={reactStrictMode: true,webpack: (config,{ nextRuntime })=>{config.externals.push({// Prevent compilation failure under Next.js build (`next build`):// `Module build failed: UnhandledSchemeError: Reading from "cloudflare:sockets" is not handled by plugins (Unhandled scheme)`"cloudflare:sockets": "commonjs cloudflare:sockets",});if(nextRuntime==="edge"){// expose access to Node.js `net` module within Next.js Edge runtime local sandbox// same as Next.js does for `node:buffer`, `node:async_hooks` etc// - https://github.com/vercel/next.js/blob/6185444e0a944a82e7719ac37dad8becfed86acd/packages/next/src/build/webpack/plugins/middleware-plugin.ts#L833config.externals.unshift({net: "commonjs node:net","node:net": "commonjs node:net",});}returnconfig;},};exportdefaultwithNextIntl(nextConfig);
hi @xucongyong this repo was an example attempting to reproduce how to patch node-postgres to run under Next.js edge runtime, but I realised it's not possible.
i copy mre-pg-nextjs-edge file to my project code,
but have error
next.config.mjs
error:
how to manually build pg nextjs-edge?
thank you andyjy
The text was updated successfully, but these errors were encountered: