Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created app without tailwind then added tailwind manually #381

Open
charbelsako opened this issue Jul 2, 2023 · 1 comment
Open

Created app without tailwind then added tailwind manually #381

charbelsako opened this issue Jul 2, 2023 · 1 comment

Comments

@charbelsako
Copy link

charbelsako commented Jul 2, 2023

this is the repo link

I have tried creating a new project with the tailwind css example and copying the files from there

Sometimes I get this error

Failed to compile
../node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[2].oneOf[8].use[1]!../node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[2].oneOf[8].use[2]!./styles/globals.css
TypeError: Cannot read properties of undefined (reading 'blocklist')

other times all css is removed from the page adding tailwind classes doesn't work but @apply works

I think this is because of @tailwindcss not being recognized

2023-07-02-215525_863x1043_scrot

For reference this is what it looks like before applying tailwindcss
2023-07-02-215741_864x617_scrot

@m5x5
Copy link
Collaborator

m5x5 commented Sep 9, 2023

Hey there, to me it seems like TailwindCSS is initializing correctly. And is also able to locate the css files. To me it seems like it isn't able to find the components and thus isn't able to add necessary styles.

Just in case you don't know yet: TailwindCSS locates the components from the project in files that you provide it with in the TailwindCSS config. Files are then scanned for TailwindCSS class names and these are added to the styles it's generating.
If the collection of class names from files isn't working just make sure the paths you provided it with in it's config are correct.

Hope it helps 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants