You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build works fine on my system (macOS) but when deploying to Cloudflare Pages I get the following error:
23:07:02.897 | Executing user command: bun run build
23:07:03.104 | $ vite build
23:07:03.768 | vite v6.0.3 building for production...
23:07:03.829 | transforming...
23:07:03.834 | ✓ 1 modules transformed.
23:07:03.840 | x Build failed in 40ms
23:07:03.840 | error during build:
23:07:03.840 | [@tailwindcss/vite:generate:build] Object not disposable
23:07:03.841 | file: /opt/buildhome/repo/index.css
23:07:03.841 | at q (file:///opt/buildhome/repo/node_modules/@tailwindcss/vite/dist/index.mjs:1:66)
23:07:03.841 | at P (file:///opt/buildhome/repo/node_modules/@tailwindcss/vite/dist/index.mjs:1:270)
23:07:03.841 | at Object.transform (file:///opt/buildhome/repo/node_modules/@tailwindcss/vite/dist/index.mjs:1:3715)
23:07:03.841 | at Object.handler (file:///opt/buildhome/repo/node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:50845:15)
23:07:03.841 | at file:///opt/buildhome/repo/node_modules/rollup/dist/es/shared/node-entry.js:20812:40
23:07:03.847 | error: script "build" exited with code 1
23:07:03.850 | Failed: Error while executing user command. Exited with error code: 1
23:07:03.858 | Failed: build command exited with code: 1
23:07:04.505 | Failed: error occurred while running build command
I tried both in a Nuxt project as well as in a fresh clean Vite project
Cloudflare is using Node 18 for its build process.
I can confirm that it is working with Node 22. As a workaround one can add an environment variable NODE_VERSION or a file .nvmrc with the content 22.12.0 to specify Node version for the build process as described here
This should be fixed by #15404, and will be available in the next beta release. As a temporary workaround, if you can bump Node.js to at least 18.20.x it should work again.
What version of Tailwind CSS are you using?
4.0.0-beta.7
What build tool (or framework if it abstracts the build tool) are you using?
tailwindcss: 4.0.0-beta.7
vite: 6.0.3
What version of Node.js are you using?
Node: 22.11.0
Bun: 1.1.38
Reproduction URL
https://github.com/MickL/tailwind-vite
Describe your issue
Build works fine on my system (macOS) but when deploying to Cloudflare Pages I get the following error:
The text was updated successfully, but these errors were encountered: