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

[v4] Build failed on Cloudflare pages #15519

Open
arnaudschlupp opened this issue Dec 31, 2024 · 3 comments
Open

[v4] Build failed on Cloudflare pages #15519

arnaudschlupp opened this issue Dec 31, 2024 · 3 comments

Comments

@arnaudschlupp
Copy link

arnaudschlupp commented Dec 31, 2024

What version of Tailwind CSS are you using?

"tailwindcss": "^4.0.0-beta.8"

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

"@tailwindcss/postcss": "^4.0.0-beta.8",
"postcss-cli": "^11.0.0"

What version of Node.js are you using?

[email protected]

What browser are you using?

N/A

What operating system are you using?

Linux

Reproduction URL

This repo can be cloned and deploy to Cloudflare pages to reproduce the issue: https://github.com/bep/hugo-testing-tailwindcss-v4

Describe your issue

When trying to build it on Cloudflare workers, I get the following error:

16:00:30.236 | Error: error building site: POSTCSS: failed to transform "/css/main.css" (text/css): Error: Loading PostCSS Plugin failed: Cannot find module '@tailwindcss/oxide-linux-x64-gnu'
-- | --
16:00:30.236 | Require stack:
16:00:30.236 | - /opt/buildhome/repo/node_modules/@tailwindcss/oxide/index.js
16:00:30.236 | - /opt/buildhome/repo/node_modules/@tailwindcss/postcss/dist/index.js
16:00:30.237 |  
16:00:30.237 | (@/opt/buildhome/repo/postcss.config.js)
16:00:30.237 | at load (/opt/buildhome/repo/node_modules/postcss-load-config/src/plugins.js:28:11)
16:00:30.237 | at async Promise.all (index 0)
16:00:30.237 | at async plugins (/opt/buildhome/repo/node_modules/postcss-load-config/src/plugins.js:57:12)
16:00:30.237 | at async processResult (/opt/buildhome/repo/node_modules/postcss-load-config/src/index.js:39:14)
16:00:30.237 | at async Promise.all (index 0)
Screenshot 2024-12-30 at 10 20 01
@holakirr
Copy link

holakirr commented Jan 5, 2025

Same here

@kylemh
Copy link

kylemh commented Jan 6, 2025

seeing the same thing with Node 22 and using CodeFresh (not CloudFlare)

[2025-01-06T19:01:14.682Z] ERROR in ./lib/global.css
[2025-01-06T19:01:14.682Z] Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
[2025-01-06T19:01:14.682Z] ModuleError: Module Error (from ./node_modules/postcss-loader/dist/cjs.js):
[2025-01-06T19:01:14.682Z] Loading PostCSS "@tailwindcss/postcss" plugin failed: Cannot find module '../lightningcss.linux-x64-gnu.node'
[2025-01-06T19:01:14.682Z] Require stack:
[2025-01-06T19:01:14.682Z] - /codefresh/volume/customer-dash/client/node_modules/lightningcss/node/index.js
[2025-01-06T19:01:14.682Z] - /codefresh/volume/customer-dash/client/node_modules/@tailwindcss/postcss/dist/index.js
[2025-01-06T19:01:14.682Z] - /codefresh/volume/customer-dash/client/node_modules/postcss-loader/dist/utils.js
[2025-01-06T19:01:14.682Z] - /codefresh/volume/customer-dash/client/node_modules/postcss-loader/dist/index.js
[2025-01-06T19:01:14.682Z] - /codefresh/volume/customer-dash/client/node_modules/postcss-loader/dist/cjs.js
[2025-01-06T19:01:14.682Z] - /codefresh/volume/customer-dash/client/node_modules/loader-runner/lib/loadLoader.js
[2025-01-06T19:01:14.682Z] - /codefresh/volume/customer-dash/client/node_modules/loader-runner/lib/LoaderRunner.js
[2025-01-06T19:01:14.682Z] - /codefresh/volume/customer-dash/client/node_modules/webpack/lib/NormalModuleFactory.js
[2025-01-06T19:01:14.682Z] - /codefresh/volume/customer-dash/client/node_modules/webpack/lib/Compiler.js
[2025-01-06T19:01:14.682Z] - /codefresh/volume/customer-dash/client/node_modules/webpack/lib/webpack.js
[2025-01-06T19:01:14.682Z] - /codefresh/volume/customer-dash/client/node_modules/webpack/lib/index.js
[2025-01-06T19:01:14.682Z] - /codefresh/volume/customer-dash/client/node_modules/webpack-cli/lib/webpack-cli.js
[2025-01-06T19:01:14.682Z] - /codefresh/volume/customer-dash/client/node_modules/webpack-cli/lib/bootstrap.js
[2025-01-06T19:01:14.682Z] - /codefresh/volume/customer-dash/client/node_modules/webpack-cli/bin/cli.js
[2025-01-06T19:01:14.682Z] - /codefresh/volume/customer-dash/client/node_modules/webpack/bin/webpack.js

works fine locally on my Mac though!

@jyezy
Copy link

jyezy commented Jan 8, 2025

Same issue on a few versions of Node

21:32:39.890 (@./global.css)
21:32:39.890 Module Error (from ../../node_modules/postcss-loader/dist/cjs.js):
21:32:39.890 Loading PostCSS "@tailwindcss/postcss" plugin failed: Cannot find module '@tailwindcss/oxide-linux-x64-gnu'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants