Module not found: Can't resolve '@/lib/utils'

Hi, @leoceolin! Welcome to the Vercel Community :smile:

The “Module not found: Can’t resolve ‘@/lib/utils’” error is a syntax error that occurs when the static import statement cannot find the file at the declared path. This error is often caused by inconsistencies in filename letter-casing between your repository and local machine, or both.

Here are some possible reasons and solutions for this error:

  1. Make sure that the file ‘@/lib/utils’ actually exists in your project structure. The ‘@’ symbol typically represents an alias for the root of your project, so make sure your project is configured to use this alias.
  2. Some filesystems are case-insensitive, but Vercel deployments use a case-sensitive filesystem. Double-check that the casing in your import statement exactly matches the actual filename and path.
  3. Check if you have properly configured path aliases in your TypeScript or JavaScript configuration file. You might need to add something like this:
{
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@/*": ["./*"]
    }
  }
}

Let us know how you get on :pray:

1 Like