ui: [bug]: Cannot read properties of undefined (reading 'resolvedPaths')
Describe the bug
Affected component/components
Almost all components
How to reproduce
Any npx shadcn@latest add causes this issue
Run the npx shadcn@latest add calendar
System Info
Windows 11
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 71
- Comments: 72
Commits related to this issue
- add ui on components.json file This fix: [Shadcn Issues](https://github.com/shadcn-ui/ui/issues/6483) — committed to hakimLyon/epic-stack by hakimLyon 2 years ago
- fix: Shadcn expects this now as per shadcn-ui/ui/issues/6483 — committed to keremk/mentopanda by keremk 2 years ago
- Fix: update alias configuration to resolve shadcn-ui/ui#6483 (#916) Co-authored-by: Kent C. Dodds <me@kentcdodds.com> — committed to epicweb-dev/epic-stack by hakimLyon 2 years ago
- fix error when adding shadcn component. issue: https://github.com/shadcn-ui/ui/issues/6483 — committed to prabuwardhana/MeroCMS by prabuwardhana 2 years ago
same here! problem solved by using 2.1.8
Installing from the last version, not latest temporarily solves this:
npx shadcn@2.1.8 add ...Awesome. the CLI should handle these cases. I’ll fix.
Anyone coming to this issue, make sure you have aliases defined for
components,utils,ui,libandhooksin your components.json.Ah I see. Looks like you’re missing some aliases. Can you update your aliases in
components.jsonto the following and try again?Same here
I didn’t need to delete my
components.jsonjust added theuipath in the aliases and it worked like a charm!components.json:Works! The error should have indicated at least that the issue was with aliases. Thanks still!
Thanks @shadcn! worked for me too…
Solution : problem solved by using 2.1.8 , Since 29/01/2025
I have face the same issue but fixed when i deleted components.json and re Initialize shadcn. just do
rm ./components.jsonnpx shadcn@latest initworking now for me on Mac.
Missing
On
Thank you @shadcn
Thanks for the workaround!
Same here!
It works in my repository composed by Next.js on Mac OS. Thanks!
ex:
works like a charm
This worked for me as well.
Thank you @shadcn it worked for me and I am on Mac
Thanks @shadcn. Worked for me too.
does anyone get this error now?
⨯ ./src/app/globals.css.webpack[javascript/auto]!=!./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[3]!./src/app/globals.css Error: It looks like you're trying to usetailwindcssdirectly as a PostCSS plugin. The PostCSS plugin has moved to a separate package, so to continue using Tailwind CSS with PostCSS you'll need to install@tailwindcss/postcssand update your PostCSS configuration. Import trace for requested module: ./src/app/globals.css.webpack[javascript/auto]!=!./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[3]!./src/app/globals.css ./src/app/globals.csstried above solutions. none worked…
same
# ✅ Solutionpnpm dlx shadcn@2.1.8 add label# ❌ Errorpnpm dlx shadcn@latest add labelSame - on mac - vscode