# `Error: The Edge Runtime does not support Node.js '…' module.`

**Where it appears:** Vercel logs or terminal

**What it means:** A route or middleware configured to run on the lightweight Edge runtime imported a package that requires full Node.js.

## Likely causes

- Importing a full database driver or Node `crypto`/`fs` library inside `middleware.ts` or an Edge route.
- Setting `export const runtime = 'edge'` on a route that uses Node-only libraries.

## Message for your agent

```text
I get `The Edge Runtime does not support Node.js module`. Keep heavy auth/database logic in standard Node.js Server Actions or Route Handlers, or use `@neondatabase/serverless`.
```

**Prevention:** Use the standard Node.js runtime for Server Actions and Route Handlers unless Edge is specifically needed.

---
Source: [Agentic Makers](https://agenticmakers.app/en/help/errors/edge-runtime-does-not-support-nodejs-module) · License: CC BY 4.0
