Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Tailwind CSS not working in WSL #10244

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

Closed
geeekgod opened this issue Jan 5, 2023 · 12 comments
Closed

Tailwind CSS not working in WSL #10244

geeekgod opened this issue Jan 5, 2023 · 12 comments
Assignees

Comments

@geeekgod
Copy link

geeekgod commented Jan 5, 2023

What version of Tailwind CSS are you using?

I'm using the gem tailwindcss-rails which has tailwindcss v3.2.4

What build tool (or framework if it abstracts the build tool) are you using?

I'm not using any build tool since I'm using Rails 7 with import maps.

What version of Node.js are you using?

v16.17.0

What browser are you using?

Firefox

What operating system are you using?

WSL Ubuntu 20.04

Reproduction URL
tailwind-rails-bug

Describe your issue

I'm trying to use tailwindcss in my rails app using the official documentation, but unable to run the app since tailwindcss is not working in my WSL system. I opened an issue Help with tailwindcss-rails setup, the team informed me to open a bug report since the binary file is causing the problem.

@thecrypticace thecrypticace self-assigned this Jan 5, 2023
@thecrypticace
Copy link
Contributor

thecrypticace commented Jan 5, 2023

Hey! You are getting an error because you are on a 32-bit system and installing / running a 64-bit binary. We do not compile binaries for 32-bit linux because pkg (the tool we use to package node + tailwindcss into a standalone binary) doesn't support it. I don't think Node.js itself has official builds for 32-bit linux which is probably why it's not supported by pkg.

Unfortunately, I don't have a workaround other than using a 64-bit system because building a binary for 32-bit linux isn't possible currently.

@geeekgod
Copy link
Author

geeekgod commented Jan 5, 2023

Hi, @thecrypticace I'm actually using a 64-bit system.

Linux LAPTOP-O1H43SIF 4.4.0-22621-Microsoft #608-Microsoft Fri Jan 01 08:00:00 PST 2016 x86_64 x86_64 x86_64 GNU/Linux

@thecrypticace
Copy link
Contributor

@thisisrishabh22

What about your windows installation? Is it 32-bit and emulating 64-bit linux? The ELF… message indicates that the system you are on does not understand the ELF 64-bit executable format. I'm running the same version of Ubuntu in WSL2 on my Windows machine and things run fine.

Can you provide output from the following two commands in WSL?

  • file ./tailwindcss-linux-x64 (you'll need to be in the appropriate folder)
  • file /bin/ls

@thecrypticace thecrypticace reopened this Jan 5, 2023
@geeekgod
Copy link
Author

geeekgod commented Jan 5, 2023

@thecrypticace

I'm using a windows 11 machine with a 64-bit operating system, x64-based processor

Here are the output for the commands:

  • file ./tailwindcss-linux-x64
./tailwindcss-linux-x64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
  • file /bin/ls
/bin/ls: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=2f15ad836be3339dec0e2e6a3c637e08e48aacbd, for GNU/Linux 3.2.0, stripped

@thecrypticace
Copy link
Contributor

@thisisrishabh22

What happens if you download the binary directly from our releases page? Can you run that one?

wget https://github.com/tailwindlabs/tailwindcss/releases/download/v3.2.4/tailwindcss-linux-x64
chmod +x ./tailwindcss-linux-x64
./tailwindcss-linux-x64 --help

@geeekgod
Copy link
Author

geeekgod commented Jan 5, 2023

I've tried running the binary file directly from the releases page as well.
You can check the output here

@thecrypticace
Copy link
Contributor

The only difference that I can discern between my WSL installation and yours is the kernel version. I'm apparently running kernel 4.19 whereas you are on 4.4. I don't know if there's maybe a bug there. But seems unlikely.

What shell are you using?

@geeekgod
Copy link
Author

geeekgod commented Jan 5, 2023

I'm currently using zsh

and while running ./tailwindcss-linux-x64 --help I got this as the output

zsh: exec format error: ./tailwindcss-linux-x64

@thecrypticace
Copy link
Contributor

I'm not sure what's going on here. Whatever this is it has something to do with your install of WSL not recognizing some ELF binaries which is very strange. Ultimately, I don't know that there's anything we can do to fix this since I can confirm that the binary runs fine on WSL and other linux x64 systems.

Do you have Discord? Any chance you could pop in our help channel and @-mention me there? https://tailwindcss.com/discord

@geeekgod
Copy link
Author

geeekgod commented Jan 6, 2023

Yes, I've discord with me, I'll ping you there!

@thecrypticace
Copy link
Contributor

Gonna move this to discussions as it's almost certainly a environment based problem and not a problem with our binaries and the discussion is continuing in Discord until we track down the source of the problem anyway.

@tailwindlabs tailwindlabs locked and limited conversation to collaborators Jan 12, 2023
@thecrypticace thecrypticace converted this issue into discussion #10302 Jan 12, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@thecrypticace @geeekgod and others