ui: [bug] :Error: Cannot read properties of undefined (reading 'resolvedPaths')

If you’re seeing the error message, make sure you have aliases defined for components, utils, ui, lib and hooks in your components.json.

"aliases": {
  "components": "@/components",
  "utils": "@/lib/utils",
  "ui": "@/components/ui",
  "lib": "@/lib",
  "hooks": "@/hooks"
}

Thanks @MatiasSommer for helping me debug this.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 200
  • Comments: 18

Commits related to this issue

Most upvoted comments

Works now, after wasting so much time cleaning and reinstalling packages unsure about the issue.

Today, I faced this error. When I checked the ShadCN GitHub repository, I found the solution. The issue occurred because I missed adding ui, lib, and hook in the components.json file. After adding them, the problem was resolved.