laravel: [Bug]: Error: spawn Unknown system error -86 on MacOS
What happened?
How to reproduce the bug
When running the artisan native php:serve gives the error…
Error: spawn Unknown system error -86 at ChildProcess.spawn (node:internal/child_process:413:11) at spawn (node:child_process:783:9) at execFile (node:child_process:359:17) at node:child_process:252:21 at node:electron/js2c/asar_bundle:2:3130 at /Users/profile1/Documents/proyectos_laravel/nativephp/vendor/nativephp/electron/resources/js/node_modules/nativephp-electron/dist/server/php.js:47:69 at Generator.next (<anonymous>) at /Users/profile1/Documents/proyectos_laravel/nativephp/vendor/nativephp/electron/resources/js/node_modules/nativephp-electron/dist/server/php.js:8:71 at new Promise (<anonymous>) at __awaiter (/Users/profile1/Documents/proyectos_laravel/nativephp/vendor/nativephp/electron/resources/js/node_modules/nativephp-electron/dist/server/php.js:4:12) { errno: -86, code: ‘Unknown system error -86’, syscall: ‘spawn’ }
API server started on port 4000
Starting PHP server… /Users/profile1/Documents/proyectos_laravel/nativephp/vendor/nativephp/electron/resources/js/resources/php artisan serve /Users/profile1/Documents/proyectos_laravel/nativephp
Making sure app folders are available
(node:12387) UnhandledPromiseRejectionWarning: Error: spawn Unknown system error -86
at ChildProcess.spawn (node:internal/child_process:413:11)
at spawn (node:child_process:783:9)
at callPhp (/Users/profile1/Documents/proyectos_laravel/nativephp/vendor/nativephp/electron/resources/js/node_modules/nativephp-electron/dist/server/php.js:53:38)
at /Users/profile1/Documents/proyectos_laravel/nativephp/vendor/nativephp/electron/resources/js/node_modules/nativephp-electron/dist/server/php.js:135:9
at Generator.next (<anonymous>)
at /Users/profile1/Documents/proyectos_laravel/nativephp/vendor/nativephp/electron/resources/js/node_modules/nativephp-electron/dist/server/php.js:8:71
at new Promise (<anonymous>)
at __awaiter (/Users/profile1/Documents/proyectos_laravel/nativephp/vendor/nativephp/electron/resources/js/node_modules/nativephp-electron/dist/server/php.js:4:12)
at /Users/profile1/Documents/proyectos_laravel/nativephp/vendor/nativephp/electron/resources/js/node_modules/nativephp-electron/dist/server/php.js:118:45
at new Promise (<anonymous>)
(Use Electron --trace-warnings ... to show where the warning was created)
(node:12387) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
Package Version
0.1.0
PHP Version
8.1.9
Laravel Version
10.15.0
Which operating systems does with happen with?
macOS
Notes
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15 (3 by maintainers)
I solved it by running:
softwareupdate --install-rosetta