Error AtlasError Documentation and Resolution

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.

Module Not Foundbuild errors
Module not found
  • 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.
  1. Install the missing dependency locally if the import comes from npm.
  2. Verify the relative or alias path points to the correct file.
  3. Match the exact filename casing used on disk.
  4. Move server-only imports into server data functions or server components where supported.
Next.js Docs: Module Not Found
Next.js Module Not Found: causes and fixes | Error Atlas