Tailwind CSS not working in WSL #10302
-
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 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. |
Beta Was this translation helpful? Give feedback.
Replies: 14 comments 5 replies
-
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 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. |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
What about your windows installation? Is it 32-bit and emulating 64-bit linux? The Can you provide output from the following two commands in WSL?
|
Beta Was this translation helpful? Give feedback.
-
I'm using a windows 11 machine with a Here are the output for the commands:
./tailwindcss-linux-x64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
/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 |
Beta Was this translation helpful? Give feedback.
-
What happens if you download the binary directly from our releases page? Can you run that one?
|
Beta Was this translation helpful? Give feedback.
-
I've tried running the binary file directly from the releases page as well. |
Beta Was this translation helpful? Give feedback.
-
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? |
Beta Was this translation helpful? Give feedback.
-
I'm currently using zsh and while running zsh: exec format error: ./tailwindcss-linux-x64 |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
Yes, I've discord with me, I'll ping you there! |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
Not sure if this is completed related, but I was having trouble getting the gems to build on my Render.com server, but it was working fine locally. My fix was to delete my vendor/cache folder in the Rails root directory, which fixed my issue. |
Beta Was this translation helpful? Give feedback.
-
I has to switch from WSL1 to WSL2 to deal with this error message. |
Beta Was this translation helpful? Give feedback.
-
Anyone has figured how to fix this other than reinstalling WSL? |
Beta Was this translation helpful? Give feedback.
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.