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

[Bug]: medusa/ui breaks with tailwindcss v4 #11040

Closed
pnodet opened this issue Jan 18, 2025 · 4 comments · Fixed by #11041
Closed

[Bug]: medusa/ui breaks with tailwindcss v4 #11040

pnodet opened this issue Jan 18, 2025 · 4 comments · Fixed by #11041

Comments

@pnodet
Copy link
Contributor

pnodet commented Jan 18, 2025

env

❯ npx envinfo --system --binaries --browsers --npmPackages "{@medusajs/*,tailwindcss,@tailwindcss/*,postcss-mixins}"

  System:
    OS: macOS 15.2
    CPU: (14) arm64 Apple M4 Pro
    Memory: 68.72 MB / 24.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.13.0 - ~/.local/state/fnm_multishells/8096_1736968971589/bin/node
    npm: 10.9.2 - ~/.local/state/fnm_multishells/8096_1736968971589/bin/npm
    pnpm: 9.15.4 - ~/.local/state/fnm_multishells/8096_1736968971589/bin/pnpm
    bun: 1.1.43 - /opt/homebrew/bin/bun
  Browsers:
    Chrome: 132.0.6834.84
    Safari: 18.2
  npmPackages:
    @medusajs/ui: 4.0.3 => 4.0.3
    @medusajs/ui-preset: 2.3.0 => 2.3.0
    @tailwindcss/postcss: 4.0.0-beta.8 => 4.0.0-beta.8
    tailwindcss: 4.0.0-beta.8 => 4.0.0-beta.8

Node.js version

v22.13.0

What happended?

tailwindcss v4 is currently in beta and contains some changes. Apart from some behavior differences medusa/ui could work with it if configured correctly.

However among the changes made the tailwindcss package does not include the defaultTheme export which breaks since medusa/ui imports it.

pnodet added a commit to pnodet/medusa that referenced this issue Jan 18, 2025

Verified

This commit was signed with the committer’s verified signature.
mikz Michal Cichra
Removing the import allows future compatibilty with tailwind v4 where it
won't be exported anymore. Fix medusajs#11040
@christiananese christiananese self-assigned this Jan 20, 2025
@christiananese
Copy link
Contributor

Hey @pnodet
thanks for your PR.

Usually we don't make any changes to support beta versions of our dependencies, i.e. they might still change and introduce a defaultTheme for their final release. This particular change should be fine for the future, so we'll discuss this internally and might merge it.

I'll come back to you as soon as we have decided on how to proceed with this.

@pnodet
Copy link
Contributor Author

pnodet commented Jan 20, 2025

Hey @christiananese
sure.

I fully understand your position, we applied the PR changes via patch-package on our project so:

  • I don't need this PR to be implemented right now
  • I can confirm that is solves the issue and works fine.

Since this change is quite trivial I figured it would be mergeable as is and I also don't think the defaultTheme is going to change.

@pnodet
Copy link
Contributor Author

pnodet commented Jan 21, 2025

This doesn't look beta anymore!

https://www.npmjs.com/package/tailwindcss?activeTab=versions

@christiananese
Copy link
Contributor

This doesn't look beta anymore!

https://www.npmjs.com/package/tailwindcss?activeTab=versions

Nice! Thank you @pnodet. 💪

@kodiakhq kodiakhq bot closed this as completed in #11041 Jan 22, 2025
kodiakhq bot pushed a commit that referenced this issue Jan 22, 2025

Verified

This commit was signed with the committer’s verified signature.
mikz Michal Cichra
Removing the import allows future compatibilty with tailwind v4 where it won't be exported anymore. Fix #11040
noubase pushed a commit to noubase/medusa that referenced this issue Jan 22, 2025
Removing the import allows future compatibilty with tailwind v4 where it won't be exported anymore. Fix medusajs#11040
LeroySteding pushed a commit to LeroySteding/medusa-hifive that referenced this issue Jan 22, 2025
Removing the import allows future compatibilty with tailwind v4 where it won't be exported anymore. Fix medusajs#11040
jimrarras pushed a commit to jimrarras/medusa that referenced this issue Jan 28, 2025
Removing the import allows future compatibilty with tailwind v4 where it won't be exported anymore. Fix medusajs#11040
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants