Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during build (composer): Unknown system error -8 #575

Open
lhilton opened this issue Nov 19, 2024 · 5 comments
Open

Error during build (composer): Unknown system error -8 #575

lhilton opened this issue Nov 19, 2024 · 5 comments

Comments

@lhilton
Copy link

lhilton commented Nov 19, 2024

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.

@f3l1x
Copy link
Collaborator

f3l1x commented Nov 20, 2024

Hi, can you please describe your steps? It seems you are running it on your localhost?

@lhilton
Copy link
Author

lhilton commented Nov 20, 2024

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

@sordahl
Copy link

sordahl commented Nov 22, 2024

try changing your node version to 18 (I had issues with composer and changing the node version fixed it temporarely)

@lhilton
Copy link
Author

lhilton commented Nov 24, 2024

@sordahl this did not change the error. It appears that this solution is setup to only use a Linux php binary source.

@f3l1x
Copy link
Collaborator

f3l1x commented Nov 26, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants