vercel-community / php

🐘 PHP Runtime for ▲ Vercel Serverless Functions (support 7.4-8.3)
https://php.vercel.app
MIT License
1.21k stars 268 forks source link

Error: Exited with 4, Something wrong with the build process, Error: Command "vercel build" exited with 1 #518

Open guoxiangke opened 5 months ago

guoxiangke commented 5 months ago

Bug report

Description

Hello, I have a laravel project which works find if I remove 3 packages in the composer.json but when I require one, the build give errors like below. thanks.

[21:21:55.338] Running build in Washington, D.C., USA (East) – iad1
[21:21:55.459] Cloning github.com/guoxiangke/xbot-febc (Branch: preview, Commit: 4e674fd)
[21:21:55.735] Cloning completed: 276.026ms
[21:21:58.191] Restored build cache
[21:21:58.285] Running "vercel build"
[21:21:58.802] Vercel CLI 33.5.1
[21:21:59.768] > Installing Builder: vercel-php@0.5.4
[21:22:02.890] Installing dependencies...
[21:22:03.645] yarn install v1.22.17
[21:22:03.679] [1/4] Resolving packages...
[21:22:03.718] success Already up-to-date.
[21:22:03.723] Done in 0.08s.
[21:22:03.737] Running "yarn run build"
[21:22:03.949] yarn run v1.22.17
[21:22:03.977] $ vite build
[21:22:04.246] vite v5.1.2 building for production...
[21:22:04.286] transforming...
[21:22:04.541] ✓ 47 modules transformed.
[21:22:04.581] rendering chunks...
[21:22:04.597] computing gzip size...
[21:22:04.601] public/build/manifest.json            0.25 kB │ gzip:  0.13 kB
[21:22:04.601] public/build/assets/app-l0sNRNKZ.js   0.00 kB │ gzip:  0.02 kB
[21:22:04.602] public/build/assets/app-CifqVuM1.js  29.83 kB │ gzip: 11.98 kB
[21:22:04.602] ✓ built in 328ms
[21:22:04.612] Done in 0.67s.
[21:22:04.638] 🐘 Downloading user files
[21:22:04.638] 🐘 Downloading PHP runtime files
[21:22:04.642] 🐘 Installing Composer dependencies [START]
[21:22:04.684] 
[21:22:04.685] Warning: PHP Startup: Unable to load dynamic library 'mongodb' (tried: /vercel/path0/.vercel/builders/node_modules/@libphp/amazon-linux-2-v81/native/php/modules/mongodb (/vercel/path0/.vercel/builders/node_modules/@libphp/amazon-linux-2-v81/native/php/modules/mongodb: cannot open shared object file: No such file or directory), /vercel/path0/.vercel/builders/node_modules/@libphp/amazon-linux-2-v81/native/php/modules/mongodb.so (libutf8proc.so.1: cannot open shared object file: No such file or directory)) in Unknown on line 0
[21:22:04.685] 
[21:22:04.686] Warning: PHP Startup: Unable to load dynamic library 'swoole' (tried: /vercel/path0/.vercel/builders/node_modules/@libphp/amazon-linux-2-v81/native/php/modules/swoole (/vercel/path0/.vercel/builders/node_modules/@libphp/amazon-linux-2-v81/native/php/modules/swoole: cannot open shared object file: No such file or directory), /vercel/path0/.vercel/builders/node_modules/@libphp/amazon-linux-2-v81/native/php/modules/swoole.so (libodbc.so.2: cannot open shared object file: No such file or directory)) in Unknown on line 0
[21:22:04.921] [7.4MiB/0.11s] Installing dependencies from lock file
[21:22:04.924] [7.6MiB/0.11s] Verifying lock file contents can be installed on current platform.
[21:22:04.932] [7.8MiB/0.12s] Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`.
[21:22:04.935] [8.1MiB/0.12s] - Required package "madcoda/php-youtube-api" is not present in the lock file.
[21:22:04.935] [8.1MiB/0.12s] - Required package "metowolf/meting" is not present in the lock file.
[21:22:04.936] [8.1MiB/0.12s] - Required package "voku/simple_html_dom" is not present in the lock file.
[21:22:04.936] [8.1MiB/0.12s] This usually happens when composer files are incorrectly merged or the composer.json file is manually edited.
[21:22:04.936] [8.1MiB/0.12s] Read more about correctly resolving merge conflicts https://getcomposer.org/doc/articles/resolving-merge-conflicts.md
[21:22:04.936] [8.1MiB/0.12s] and prefer using the "require" command over editing the composer.json file directly https://getcomposer.org/doc/03-cli.md#require-r
[21:22:04.936] [8.1MiB/0.12s] Memory usage: 8.09MiB (peak: 9.43MiB), time: 0.12s
[21:22:04.950] Error: Exited with 4
[21:22:04.950]     at ChildProcess.<anonymous> (/vercel/path0/.vercel/builders/node_modules/vercel-php/dist/utils.js:182:24)
[21:22:04.950]     at ChildProcess.emit (node:events:517:28)
[21:22:04.950]     at ChildProcess.emit (node:domain:489:12)
[21:22:04.950]     at ChildProcess._handle.onexit (node:internal/child_process:292:12)
[21:22:04.981] Error: Command "vercel build" exited with 1
[21:22:05.045] Command "vercel build" exited with 1
[21:22:05.122] 
guoxiangke commented 5 months ago

I test with a new project, it works when init deploy. but when continue build and deploy, it fails.

guoxiangke commented 5 months ago

need redeploy without cache, now build with no error. But it should not redeploy each time !