Home Categories build errors Products Next.js Next.js module not found during build or runtime Next.js
Next.js module not found during build or runtime Module not found Next.js could not resolve an imported module, usually because the package is missing, the path is wrong, the casing is inconsistent, or a server-only module was imported in an unsupported place.
Observed message
Module not found Why it happens
The imported package is not installed in project dependencies. The import path points to the wrong file or directory. The import uses the wrong casing on a case-sensitive filesystem. A Node.js-specific module is imported in a client-side context. How to fix it
Install the missing dependency locally if the import comes from npm. Verify the relative or alias path points to the correct file. Match the exact filename casing used on disk. Move server-only imports into server data functions or server components where supported.