Node-only module used in an Edge runtime
Part of Code Quality & Syntax, which counts for 20% of the overall score. When this check fires it deducts 8 points from that category, once per scan, no matter how many places it turns up.
What it detects
A file that declares export const runtime = "edge" imports a Node core module (fs, child_process, net, ...) that does not exist on the Edge runtime. The route builds but throws at request time in production.
Why it matters
A file that declares export const runtime = "edge" runs on the Edge runtime, which is a Web-APIs-only environment without Node core modules. Importing fs, child_process, net, or similar builds successfully but throws at request time in production the moment the code path executes. It is a runtime failure that local Node testing can miss.
How to fix it
Either remove the edge runtime declaration so the route runs on the Node.js runtime where those modules exist, or replace the Node API with an Edge-compatible equivalent (Web Crypto instead of node:crypto, fetch instead of a Node HTTP client, a database driver that supports Edge). Choose based on whether the route actually needs Edge latency.
The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing
Does your repo trip this check?
Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.
Scan your repo