Can't build on Linux ARM -> cannot find module '@tailwindcss/oxide-linux-arm64-gnu'
Problem
What version of Tailwind CSS are you using? 4.0.0 What build tool (or framework if it abstracts the build tool) are you using? Vite 6 What version of Node.js are you using? 22.12.0 What browser are you using? Occurs in CLI What operating system are you using? Ubuntu Linux on arm64 Reproduction URL / Describe your issue When running `tsc && vite build` the build fails and gives the following error: [code block]
Error Output
error during build: [vite:css] Failed to load PostCSS config (searchPath: [...]): [Error] Loading PostCSS Plugin failed: Cannot find module '@tailwindcss/oxide-linux-arm64-gnu'
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Fix Tailwind CSS Build Error on ARM Linux
The error occurs because the module '@tailwindcss/oxide-linux-arm64-gnu' is not found, which indicates that the Tailwind CSS version 4.0.0 does not have a compatible build for your ARM architecture. This is likely due to the lack of pre-built binaries for certain environments or the need for specific configurations in the PostCSS setup.
Awaiting Verification
Be the first to verify this fix
- 1
Check Tailwind CSS Compatibility
Verify if the version of Tailwind CSS you are using is compatible with ARM architecture. If not, consider upgrading to a newer version that supports ARM.
bashnpm show tailwindcss versions --json - 2
Upgrade Tailwind CSS
If a newer version is available, upgrade Tailwind CSS to the latest version that supports ARM architecture. This can resolve compatibility issues.
bashnpm install tailwindcss@latest - 3
Update PostCSS Configuration
Ensure your PostCSS configuration is correctly set up to include Tailwind CSS. This may involve creating or updating the postcss.config.js file.
javascriptmodule.exports = { plugins: [ require('tailwindcss'), require('autoprefixer') ] }; - 4
Clear Node Modules and Reinstall
Sometimes, stale modules can cause issues. Clear the node_modules directory and reinstall dependencies to ensure everything is up to date.
bashrm -rf node_modules && npm install - 5
Run Build Command
After making the changes, attempt to build your project again using the same command to check if the issue is resolved.
bashtsc && vite build
Validation
To confirm the fix worked, run the build command again. If the build completes without errors related to the Tailwind CSS module, the issue is resolved. Additionally, check the output for any warnings or errors that may indicate further issues.
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep