Troubleshooting module not found issues in the Next.js Supabase kit

Troubleshoot issues related to modules not found in the Next.js Supabase SaaS kit

Let's walk through common "Module not found" errors and how to fix them in your Makerkit project.

This issue is mostly related to either dependency installed in the wrong package or issues with the file system.

1. Dependency Installation Issues

The most common cause is incorrect dependency installation. Here's how to fix it:

# First, clean your workspace
pnpm run clean:workspaces
pnpm run clean
# Reinstall dependencies
pnpm install

If you're adding new dependencies, make sure to install them in the correct package:

# For main app dependencies
pnpm install my-package --filter web
# For a specific package
pnpm install my-package --filter @kit/ui

For example, fi you're using the dependency in the @kit/ui package, you should install it in the @kit/ui package:

pnpm add my-package --filter "@kit/ui"

If it's in the main app, you should install it in the main app:

pnpm add my-package --filter web

2. Windows OneDrive Conflicts

OneDrive can cause file system issues with Node.js projects. If you're using Windows with OneDrive:

  1. Move your project outside of OneDrive-synced folders
  2. Or disable OneDrive sync for your development folder