Description
Link to minimal reproducible example
https://github.com/TheOska/edge-runtime-next-wagmi-app-router
Summary
When running my Next.js app with Edge Runtime enabled (i.e., using export const runtime = 'edge';
in my pages), I encounter the following error during runtime:
TypeError: Class extends value [object Object] is not a constructor or null
This error appears to originate from code in the reown app kit package (or one of its adapters). When I disable the Edge runtime (removing export const runtime = 'edge';
), the app runs correctly under next.js.
I expect that reown app kit and its adapters work correctly with the Edge runtime. Is this a known issue, or is there a recommended workaround or configuration change to resolve this error when using the Edge runtime?
List of related npm package versions
@reown/appkit: 1.6.9
@reown/appkit-adapter-bitcoin: 1.6.9
@reown/appkit-adapter-solana: 1.6.9
@reown/appkit-adapter-wagmi: 1.6.9
next: ^14.2.7
next-auth: ^4.24.7
next-intl: ^3.4.0
next-themes: ^0.2.1
@cloudflare/next-on-pages: ^1.13.7
Node.js Version
v20.16.0
Package Manager
yarn 1.22.19