[🐞]static builds failing Vercel
### Which component is affected?
Build process
### Describe the bug
Hey Jack,
Seems that static builds (specifically static) are failing on Vercel
I did test this on Netlify also so seems fine
No deployment errors looks like it's specifically static builds with Vercel.
Server builds are fine.
```javascript
import qwikdev from "@qwikdev/astro";
import { defineConfig } from "astro/config";
import vercel from "@astrojs/vercel";
import netlify from "@astrojs/netlify";
// https://astro.build/config
export default defineConfig({
output: "static",
integrations: [qwikdev()],
adapter: vercel(),
});
```
Everything builds fine locally, and on Netlify, but when deploying to Vercel this is what happens.
[10:44:12.453] [vite-plugin-qwik-post] ENOENT: no such file or directory, scandir 'dist/server/chunks'
Vercel defaults to LTS Node:
"By default, a new project uses the latest Node.js LTS version available on Vercel."

Error from logs:
```terminal
[10:43:59.725] Cloning github.com/Shane-Donlon/testing-static (Branch: main, Commit: d45ff33)
[10:43:59.872] Previous build caches not available
[10:43:59.954] Cloning completed: 229.000ms
[10:44:00.120] Running build in Washington, D.C., USA (East) – iad1
[10:44:00.258] Running "vercel build"
[10:44:00.645] Vercel CLI 41.3.2
[10:44:01.727] Installing dependencies...
[10:44:08.912]
[10:44:08.912] added 445 packages in 7s
[10:44:08.912]
[10:44:08.912] 163 packages are looking for funding
[10:44:08.913] run `npm fund` for details
[10:44:08.969] Running "npm run build"
[10:44:09.096]
[10:44:09.097] > build
[10:44:09.097] > npm run fix && astro build
[10:44:09.097]
[10:44:09.216]
[10:44:09.216] > fix
[10:44:09.216] > npm run lint && npm run format
[10:44:09.217]
[10:44:09.336]
[10:44:09.337] > lint
[10:44:09.337] > biome check --apply-unsafe .
[10:44:09.337]
[10:44:09.383] internalError/fs DEPRECATED ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[10:44:09.383]
[10:44:09.383] ! The argument --apply-unsafe is deprecated, it will be removed in the next major release. Use --write --unsafe instead.
[10:44:09.383]
[10:44:09.383]
[10:44:09.391] Checked 14 files in 7ms. Fixed 1 file.
[10:44:09.520]
[10:44:09.520] > format
[10:44:09.520] > biome format --write .
[10:44:09.520]
[10:44:09.570] Formatted 14 files in 2ms. No fixes applied.
[10:44:10.698] Unable to load native binding qwik.linux-x64-gnu.node. Falling back to wasm build. /lib64/libm.so.6: version `GLIBC_2.38' not found (required by /vercel/path0/node_modules/@builder.io/qwik/bindings/qwik.linux-x64-gnu.node)
[10:44:10.712] using deprecated parameters for the initialization function; pass a single object instead
[10:44:10.804] 10:44:10 [content] Syncing content
[10:44:10.807] 10:44:10 [content] Synced content
[10:44:10.808] 10:44:10 [types] Generated 117ms
[10:44:10.809] 10:44:10 [build] output: "static"
[10:44:10.809] 10:44:10 [build] mode: "static"
[10:44:10.809] 10:44:10 [build] directory: /vercel/path0/dist/
[10:44:10.809] 10:44:10 [build] adapter: @astrojs/vercel
[10:44:10.810] 10:44:10 [build] Collecting build info...
[10:44:10.810] 10:44:10 [build] ✓ Completed in 133ms.
[10:44:10.811] 10:44:10 [build] Building static entrypoints...
[10:44:11.903] 10:44:11 [vite] [32m✓ built in 1.06s[39m
[10:44:11.903] 10:44:11 [build] ✓ Completed in 1.09s.
[10:44:11.910] Unable to load native binding qwik.linux-x64-gnu.node. Falling back to wasm build. /lib64/libm.so.6: version `GLIBC_2.38' not found (required by /vercel/path0/node_modules/@builder.io/qwik/bindings/qwik.linux-x64-gnu.node)
[10:44:11.931] [36mvite v5.4.14 [32mbuilding for production...[36m[39m
[10:44:11.941] transforming...
[10:44:12.270] [32m✓[39m 9 modules transformed.
[10:44:12.304] rendering chunks...
[10:44:12.345] [31mx[39m Build failed in 414ms
[10:44:12.453] [vite-plugin-qwik-post] ENOENT: no such file or directory, scandir 'dist/server/chunks'
[10:44:12.453] Stack trace:
[10:44:12.454] at Object.readdirSync (node:fs:1584:26)
[10:44:12.454] at Object.handler (file:///vercel/path0/node_modules/@builder.io/qwik/dist/optimizer.mjs:6322:67)
[10:44:12.454] at async file:///vercel/path0/node_modules/rollup/dist/es/shared/node-entry.js:22878:27
[10:44:12.454] at async build (file:///vercel/path0/node_modules/vite/dist/node/chunks/dep-CHZK6zbr.js:65607:16)
[10:44:12.454] at async withTakingALongTimeMsg (file:///vercel/path0/node_modules/astro/dist/integrations/hooks.js:30:18)
[10:44:12.535] Error: Command "npm run build" exited with 1
[10:44:13.252]
```
### Reproduction
https://github.com/Shane-Donlon/testing-static
### Steps to reproduce
Deploy to Vercel - build will fail.
The reproduction is just the standard template. nothing fancy.
### System Info
```shell
System:
OS: Linux 6.8 Linux Mint 22.1 (Xia)
CPU: (16) x64 AMD Ryzen 9 6900HX with Radeon Graphics
Memory: 21.02 GB / 28.13 GB
Container: Yes
Shell: 5.2.21 - /bin/bash
Binaries:
Node: 22.14.0 - ~/.nvm/versions/node/v22.14.0/bin/node
npm: 11.1.0 - ~/.nvm/versions/node/v22.14.0/bin/npm
pnpm: 10.4.1 - ~/.local/share/pnpm/pnpm
Browsers:
Chrome: 134.0.6998.88
```
### Additional Information
_No response_
关闭于 2025-04-15 13 条评论