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

Compatibility Issue with tailwindcss in twrnc after Upgrade to Version 4 #331

Open
m-zawadzki opened this issue Jan 24, 2025 · 8 comments
Open

Comments

@m-zawadzki
Copy link

Hi,

I'm facing an issue with running my project where I use the twrnc package. I noticed that 3 days ago, tailwindcss was updated to version 4, and in the dependencies of twrnc in the package.json, I can see the following:

"dependencies": {
  "tailwindcss": ">=2.0.0"
}

This means that when installing dependencies, tailwindcss can be automatically upgraded to version 4, which caused issues in my app because twrnc isn't compatible with version 4 yet.

As a temporary workaround, I've added the following to my package.json:

"overrides": {
  "tailwindcss": "3.4.17"
}

This ensures that tailwindcss stays on version 3.4.17, which works with twrnc.

Do you have any plans to release a version of twrnc that will support tailwindcss version 4?

Thanks in advance for your help!

@karimelsaidy
Copy link

same error here
Unable to resolve module tailwindcss/resolveConfig

@jaredh159
Copy link
Owner

thanks for reporting this. i hadn't thought about v4 compat yet, i'll need to look into that. for now, i should tighten up the peer dep requirement. i'll do that right now

@jaredh159
Copy link
Owner

ok, v4.6.1 is out now, which stipulates <4.0.0 for the tailwindcss dep for now.

@m-zawadzki
Copy link
Author

Nice, thanks a lot 🥇

@AkisArou
Copy link

Any timeframe for Tailwind v4?

@jaredh159
Copy link
Owner

no, i can't say i have a time frame. if it's easy, maybe soon. i'm pretty focused on other things right now, so would definitely be glad for some community help on this front.

@jvliwanag
Copy link

Upgrading twrnc to support tailwind v4 is going to be a major challenge now that tailwind now relies on tools to refer to css variables instead of resolving theme values (see here). But some hope here.

@jaredh159
Copy link
Owner

@jvliwanag yeah, i could see that. the thing i'm wondering is how it is connected to the purpose of this library. because we intentionally target just RN Native, i'm not sure that a ton of the features or functionality of v4 is fully relevant for us, so i wonder if we can just stick to <4. but i also realize that's not really a great long-term strategy, as people like to be on the latest versions of things. just thinking aloud. i don't have the bandwidth or desire at this time to do a deep rewrite, my RN apps are in maintenance mode, and this library serves its purpose for them just fine. but i understand things in the ecosystem are moving forward.

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

5 participants