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

bunx @tailwindcss/upgrade fails on windows due to path handling #17979

Open
kjk opened this issue Mar 7, 2025 · 1 comment
Open

bunx @tailwindcss/upgrade fails on windows due to path handling #17979

kjk opened this issue Mar 7, 2025 · 1 comment
Labels
bug Something isn't working bunx Something that has to do with `bunx`

Comments

@kjk
Copy link

kjk commented Mar 7, 2025

What version of Bun is running?

1.2.4+fd9a5ea66

What platform is your computer?

Microsoft Windows NT 10.0.26100.0 x64

What steps can reproduce the bug?

What is the expected behavior?

It should work just like npx @tailwindcss/upgrade

What do you see instead?

It fails with:

PS C:\Users\kjk\src\edna> bunx @tailwindcss/upgrade
≈ tailwindcss v4.0.12

│ Searching for CSS files in the current directory and its subdirectories…
│ ↳ Linked `.\tailwind.config.cjs` to `.\src\main.css`
│ Migrating JavaScript configuration files…
│ ↳ Could not load the configuration file: Can't resolve '..\..\..\..\..\..\..\..\..\src\edna\tailwind.config.cjs' in
│   'C:\Users\kjk\AppData\Local\Temp\bunx-329713139-@tailwindcss\upgrade@latest\node_modules\@tailwindcss\upgrade\dist'

npx @tailwindcss/upgrade doesn't fail.

Note: the path ..\..\..\..\..\..\..\..\..\src\edna\tailwind.config.cjs relative to C:\Users\kjk\AppData\Local\Temp\bunx-329713139-@tailwindcss\upgrade@latest\node_modules\@tailwindcss\upgrade\dist is correct.

It seems some node compat function doesn't handle relative path which results in failure to open that file. Not sure if that's just Windows or all platforms, I only tested Windows.

Additional information

No response

@kjk kjk added bug Something isn't working needs triage labels Mar 7, 2025
@RiskyMH RiskyMH added bunx Something that has to do with `bunx` and removed needs triage labels Mar 7, 2025
@RiskyMH
Copy link
Member

RiskyMH commented Mar 7, 2025

It seems some node compat function

Note that as you have node installed and not using --bun, this seems to be an issue with what bunx is passing to node (and being incorrect compared to npx)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working bunx Something that has to do with `bunx`
Projects
None yet
Development

No branches or pull requests

2 participants