ui
ui copied to clipboard
[bug]: CLI breaks tailwind.config.ts
Describe the bug
fontFamily: {
sans: [
'Work Sans',
'sans-serif',
'Calibri',
'Candara',
'Segoe',
'Segoe UI',
'Optima',
'Arial',
],
},
Becomes
fontFamily: {
sans: [\n 'Work Sans',\n 'sans-serif',\n 'Calibri',\n 'Candara',\n 'Segoe',\n 'Segoe UI',\n 'Optima',\n 'Arial',\n ]
},
Affected component/components
CLI
How to reproduce
Have multiple lines in your tw config and use the CLI
fontFamily: {
sans: [
// This breaks
'Work Sans',
],
},
fontFamily: {
sans: [
'Work Sans',
'Or this',
],
},
Affected component/components
CLI
How to reproduce
Have multiple lines in your tw config and use the CLI
fontFamily: {
sans: [
// This breaks
'Work Sans',
],
},
fontFamily: {
sans: [
'Work Sans',
'Or this',
],
},
Codesandbox/StackBlitz link
No response
Logs
No response
System Info
Next 14/15
Before submitting
- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
I have been getting errors concerning a dependency missing a comma ever since I ran pnpm dlx shadcn@latest -a -o
I have been getting same error since 3 days, do you have any temporary solution for this until the bug is resolved, for me, some tailwind classes for colors or font sizes do not work, on next js 14/15.
Fortunately, I found a blog which had the solution for this and I tried and it worked. Here is the solution and the link to blog.
Replace existing content with this in the tailwind config
content: [ './src/app/**/*.{ts,tsx}', './src/components/**/*.{ts,tsx}', './@/**/*.{ts,tsx}', ]
This worked for me.
Here is the link to blog https://remslabs.com/blog/quick-fix-for-tailwind-css-issues-in-next-js-13-with-shadcn-ui
You can manually fix the TS file after running the CLI, or you can remove multiline comments from array objects beforehand.
This issue has been automatically marked as stale due to one year of inactivity. It will be closed in 7 days unless there’s further input. If you believe this issue is still relevant, please leave a comment or provide updated details. Thank you. (This is an automated message)
This issue has been automatically closed due to one year of inactivity. If you’re still experiencing a similar problem or have additional details to share, please open a new issue following our current issue template. Your updated report helps us investigate and address concerns more efficiently. Thank you for your understanding! (This is an automated message)