build: lift Vite to 8, and get the tree out of iCloud's way
The frontend build hung on 0% CPU, roughly every other run: blocked in read() inside libuv, no output, forever. `svelte-kit sync` alone did it too, so it was not the bundler. The cause was not the toolchain. `~/Documents` is iCloud-managed, and iCloud evicts what it thinks is cold — which for a dependency tree is nearly all of it: 359 of 400 sampled files under node_modules were `dataless`. Reading an evicted file blocks until it is downloaded again, and a download that stalls hangs the build for good. The tell was a different error entirely: Playwright once reported `ETIMEDOUT: connection timed out, read` while loading jsconfig.json, and ETIMEDOUT on a local file read does not exist. Vite 5 and esbuild 0.21 predate Node 22 and this machine runs Node 26, so they went up anyway — to Vite 8 with @sveltejs/vite-plugin-svelte 7, which SvelteKit 2.70 takes. `package-lock.json` had to be deleted for npm to resolve it; it held plugin 4 and rejected the whole tree with ERESOLVE. That made the build faster. It was not what was hanging. `engines` says Node >= 22.12 now, so the next person is told rather than left watching a process do nothing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
494640c1a8
commit
a29534c811
+10
@@ -11,6 +11,16 @@
|
||||
|
||||
# Frontend
|
||||
node_modules/
|
||||
# iCloud syncs ~/Documents, and it evicts what it thinks is cold — which for a
|
||||
# dependency tree is nearly all of it. An evicted file blocks on read until it is
|
||||
# downloaded again, and a download that stalls hangs the build for good: 0 % CPU,
|
||||
# no output, forever. macOS never syncs anything ending in .nosync, so the tree
|
||||
# lives there and `node_modules` is a symlink to it. Redo it after a fresh clone:
|
||||
#
|
||||
# mv node_modules node_modules.nosync && ln -s node_modules.nosync node_modules
|
||||
#
|
||||
# The real fix is a repo path outside a synced folder.
|
||||
node_modules.nosync/
|
||||
/web/.svelte-kit/
|
||||
/web/build/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user