Error during build (composer): Unknown system error -8
Bug report
- Version: 0.7.3
- URL: No
- Repository: No
- Node Version: v20
- Host Machine: macOS 15.1
Description
Attempting to run vercel build against a fresh Laravel + Filament project and I am getting the following error:
> vercel build
Vercel CLI 39.0.5
Installing dependencies...
up to date in 201ms
44 packages are looking for funding
run `npm fund` for details
Running "npm run build"
> build
> vite build
vite v5.4.10 building for production...
✓ 54 modules transformed.
public/build/manifest.json 0.45 kB │ gzip: 0.19 kB
public/build/assets/app-CPyPE_1i.css 58.71 kB │ gzip: 9.68 kB
public/build/assets/theme-B2T0CjxR.css 110.15 kB │ gzip: 15.46 kB
public/build/assets/app-z-Rg4TxU.js 35.05 kB │ gzip: 14.06 kB
✓ built in 736ms
🐘 Downloading user files
🐘 Downloading PHP runtime files
🐘 Installing Composer dependencies [START]
Error: spawn Unknown system error -8
at ChildProcess.spawn (node:internal/child_process:421:11)
at spawn (node:child_process:761:9)
at /Users/leezilla/sites/membership-platform/.vercel/builders/node_modules/vercel-php/dist/utils.js:173:49
at new Promise (<anonymous>)
at spawnAsync (/Users/leezilla/sites/membership-platform/.vercel/builders/node_modules/vercel-php/dist/utils.js:172:12)
at runPhp (/Users/leezilla/sites/membership-platform/.vercel/builders/node_modules/vercel-php/dist/utils.js:153:15)
at runComposerInstall (/Users/leezilla/sites/membership-platform/.vercel/builders/node_modules/vercel-php/dist/utils.js:94:11)
at Object.build (/Users/leezilla/sites/membership-platform/.vercel/builders/node_modules/vercel-php/dist/index.js:43:46)
at async doBuild (/Users/leezilla/.local/share/nvm/v20.8.1/lib/node_modules/vercel/dist/index.js:123379:23)
at async main2 (/Users/leezilla/.local/share/nvm/v20.8.1/lib/node_modules/vercel/dist/index.js:123185:5) {
errno: -8,
code: 'Unknown system error -8',
syscall: 'spawn'
}
In local development, composer runs fine and has no errors. I am able to track the full command run via the utils.js and have no problems manually running the composer command generated there. It appears that I cannot spawn the child process to run this.
Hi, can you please describe your steps? It seems you are running it on your localhost?
It is in my above message, in the output I provided. This is the result of running vercel build. Yes, localhost:
- Version: 0.7.3
- URL: No
- Repository: No
- Node Version: v20
- Host Machine: macOS 15.1
try changing your node version to 18 (I had issues with composer and changing the node version fixed it temporarely)
@sordahl this did not change the error. It appears that this solution is setup to only use a Linux php binary source.
Oh I get it now, I was not aware of vercel build command, now I am. vercel-php is not prepared to be build on your machine, thus it do not work.