Vite CI builds timing out
Hi, didn't want to hijack the other thread (Nuxt builds).
My builds are also timing out since this week (?) - not sure if it is because pnpm package upgrades or not - Dependabot is keeping me busy haha. But locally all is fine.
Vite 5.4.3.
Local builds and builds through GitHub Actions are building just fine hmm.
I've tried:
- Node 20 and Node 22.
- Disabling build cache.
I have a deploy log if needed.
If i compare locally vs github action vs CF pages CI it does log:
vite v5.4.3 building for production...
but it doesn't log
✓ 3207 modules transformed.
it will timeout here.
Any pointers / ideas / suggestions?
22 Replies
@Wouter | PB Hi! Can you send me a build ID from one of your failed builds?
Hi @Jacob | CI ! 2559068 - is that the build ID?
It will be in the URL - should look like this:
cd699eb2-95a8-499f-a22e-dee5b3cec4fa
5f60d0b1-e511-4f85-b1ed-b59d2b01eb28
Sorry wrong paste
np! Taking a look
Appreciated
Does it time out every time? Or only sometimes?
Yep every build since 2 days
That's weird - we haven't changed anything on our side in that time...
Success
1:39PM September 10, 2024
My last successful build, but I did some package updates after this (mostly dependabot version bumps)
Do you have a successful preview deployment you can retry to see if it that still works? So that we can rule out whether something in the deps may be causing it
Oh great idea, we can do that can't we 😄 Retrying the last successful
Ok that one is working hmmm, so something deps
and you confirmed you're for sure running the same version of Node/pnpm in CI?
Locally im running node 22, but also tried with v22 (deploy logs confirmed it installed v22). In GitHub Actions i'm running V20 as well.
I have a feeling it's something stupid, so i'll try to check which deps i've installed before wasting too much of your time
Ok that went quicker that I thought.
The timeout is caused by the "sass-embedded": "^1.78.0", package.
and/or a scss import (checking that now)
I’m not too familiar with sass-embedded - does it rely on any system packages?
I see it uses a native dart binary. I wonder if that’s dynamically linking to something that is causing the issue. Our Ubuntu image is a bit out of date, but we’re rolling out some updates for it in the next few days.
Ah hmm, im not familiar with it either haha.
https://vitejs.dev/guide/features#css-pre-processors
I see, for GitHub I use ubuntu-latest so that might explain why it works there.
@Jacob | CI I've installed sass instead of sass-embedded and that works for now.
"This package is an alternative to the sass package. It supports the same JS API as sass and is maintained by the same team, but where the sass package is pure JavaScript, sass-embedded is instead a JavaScript wrapper around a native Dart executable. This means sass-embedded will generally be much faster especially for large Sass compilations, but it can only be installed on the platforms that Dart supports: Windows, Mac OS, and Linux."
Ah that's what you meant.
Anyhow, for now taking the victory haha. Will try sass-embedded again in a while then (since it's recommended)
Thank you for taking your time to take a look with me 🚀
@TetraEtc fyi your nuxt build might be the same issue?
@Wouter | PB possibly - I've assumed it was vite related. I'll have a read shortly
@Wouter | PB - it appears to have worked now.
@TetraEtc Awesome!
the lack of visible error logs made it a bit frustrating but glad it's fixed
@Wouter | PB if you get a sec, would you mind testing that failing version of the dart library on the new Workers Builds? It uses a different system than Pages that we’re hoping has better compatibility with tools like this
@Jacob | CI Wow sorry, ran into this thread on accident. I'm not sure i'm receiving notifications or no clue how Discord works 🤣
I only deploy through Pages though.
I'll try to setup something Sunday
Hey @Jacob | CI , looked briefly into it , but I'm using React + Vite instead of Next.js 😦 All pages mention next.js / new projects, not existing projects https://developers.cloudflare.com/workers/static-assets/ / https://developers.cloudflare.com/workers/frameworks/framework-guides/nextjs/
I can't allocate time to dive into this, but i'm more than happy to test a new Pages build
Im getting a similar issue as you are I think
lang="scss"
Adding this to my <style>
tag makes Cloudflare deploy hang forever when I deploy via push but interestingly will deploy if I manually deploy via wrangler CLI
Solution: Use: "vite": "5.3.5"