next-template icon indicating copy to clipboard operation
next-template copied to clipboard

/styles/globals.css The `border-border` class does not exist. If `border-border` is a custom class, make sure it is defined within a `@layer` directive.

Open ghost opened this issue 1 year ago • 8 comments

Any ideas? Setup the template and then ran pnpm dlx shadcn-ui@latest init for the component.json.

ghost avatar Jul 04 '23 17:07 ghost

same issue, anyone solve this?

jamie-michael avatar Jan 13 '24 09:01 jamie-michael

I had to delete the tailwind.config.js file as in this response: https://github.com/shadcn-ui/ui/issues/214#issuecomment-1784191368

hugoPinho012 avatar Jan 21 '24 13:01 hugoPinho012

so whats the solution here?

haikelareff avatar Feb 04 '24 14:02 haikelareff

Delete tailwind.config.js

hugoPinho012 avatar Feb 04 '24 14:02 hugoPinho012

If anyone ever encounters this error, I realized that I had both a tailwind.config.js and tailwind.config.ts in my repository at root level (I had forgotten to delete tailwind.config.js).

Deleting the redundant tailwind.config.js fixed it.

Hope this helps out!

DhruvRathod1 avatar Jun 16 '24 10:06 DhruvRathod1

same issue, anyone solve this?

If anyone ever encounters this error, I realized that I had both a tailwind.config.js and tailwind.config.ts in my repository at root level (I had forgotten to delete tailwind.config.js).

Deleting the redundant tailwind.config.js fixed it.

Hope this helps out!

DhruvRathod1 avatar Jun 16 '24 10:06 DhruvRathod1

I found the solution in this page https://ui.shadcn.com/docs/installation/manual

JuanFerdevv avatar Jul 24 '24 22:07 JuanFerdevv

As a first-time user of shadcn-ui, I encountered this error due to misconfiguring the tailwind.config.ts file. I'm sharing my experience for other beginners like me.

If you're following this guide, I recommend double-checking your tailwind.config.ts file. As mentioned in the comments above, the problem occurs when the configuration defining border-border is missing. If you have two config files, accidentally deleting the .js file could cause this issue.

If you're following the Next.js guide, make sure to include these lines as a child of the extend property. The default structure should be maintained.

joonhoekim avatar Aug 18 '24 08:08 joonhoekim