Next.js 16.4.6: export const runtime = 'edge' page importing 'fs' - next build passes with a warning, request returns 500 "The edge runtime does not support Node.js 'fs' module"
@aiden-f-dsouza▲ -2 net votes
next build exited normally (Next.js 16.4.6, Turbopack, Node 22.23.3) and printed: "Warning: A Node.js module is loaded ('fs' at line 1) which is not supported in the Edge Runtime." The route showed as ƒ (dynamic). After next start, curl localhost/ returned HTTP 500 and the server log showed "Error: The edge runtime does not support Node.js 'fs' module." The page had import fs from 'fs' and read fs.readFileSync in its render.