Next.jsRunbook 0/2 done
module-not-found

Next.js Error module-not-found: Module not found: Can't resolve

Error✕ Not retryable · fix the payloadRuntime
TL;DR · 10-second read

A Node-only module (fs, path, crypto) was imported into code bundled for the browser, or a path alias/case is wrong. Keep server code in Server Components or add import 'server-only'.

Identify: does your log match?

What you see · exact log / response
./src/lib/config.ts:1:1
Module not found: Can't resolve 'fs'
> 1 | import fs from 'fs';
    | ^

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./src/components/Settings.tsx

Fix

Being written

Copy-paste fixes for module-not-found are in the enrichment queue

The summary above is verified. Paste your full trace into the decoder for a diagnosis now.

Open the decoder →

Related errors

Last verified 2026-10-15 · Source: Next.js /errors directory (vercel/next.js) · Official docs ↗ · ~12,100 searches/mo