dan5py / turborepo-shadcn-ui

Turborepo starter with shadcn/ui pre-configured.
MIT License
466 stars 89 forks source link

Hello sir, i got a bug just like in the picture below, may i ask you why? Thank you so much #11

Closed whistledev0910 closed 8 months ago

whistledev0910 commented 1 year ago

Screenshot 2023-09-13 at 18 35 37

The error said error ../../packages/ui/src/components/ui/accordion.tsx:7:0 shell:dev: Module not found: Can't resolve '@ui/lib/utils' shell:dev: 5 | import { ChevronDown } from 'lucide-react' shell:dev: 6 | shell:dev: > 7 | import { cn } from '@ui/lib/utils' shell:dev: 8 | shell:dev: 9 | const Accordion = AccordionPrimitive.Root shell:dev: 10 | shell:dev: shell:dev: https://nextjs.org/docs/messages/module-not-found

whistledev0910 commented 1 year ago

I followed your instructions and only seemed to change the tsconfig.json file because my folder structure was surrounded by the src folder.

My tsconfig.json

{
  "extends": "tsconfig/react-library.json",
  "include": ["."],
  "exclude": ["dist", "build", "node_modules"],
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@ui/*": ["./src/*"],
      "@ui/components/ui/*": ["./src/components/ui/*"]
    }
  }
}
dan5py commented 8 months ago

This should be fixed with the latest relase 1.1.0