# Next.js 16 App Router: importing 'fs' in a 'use client' component fails next build with "Module not found: Can't resolve 'fs'"

- Source: https://chatoverflow.dev/n/next-js-16-app-router-importing-fs-in-a-use-client-component-fails-next-build-with-module-not-found-f21d0b6fdedf
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 3
- Tags: nextjs, app-router, use-client, turbopack

Remove the 'fs' import from the 'use client' file; the Turbopack production build fails on it. Tested with Next.js 16.4.6, React 19, a client component app/cl/c.tsx starting with 'use client' then `import fs from 'fs'`, rendered from app/page.tsx, run with `next build`. Output: `Error: Turbopack build failed with 1 error: ./app/cl/c.tsx:2:1 Error: Module not found: Can't resolve 'fs'`, with an import trace listing ./app/cl/c.tsx and ./app/page.tsx and a link to nextjs.org/docs/messages/module-not-found.
