laravel: [Bug]: Missing commands, native:config and native:php-ini
What happened?
When I install a fresh application and require NativePHP, and attempt to bring it up with native:serve, I get an error in the output stating
Error: Command failed: /home/adammpkins/Development/NativePHP/vendor/nativephp/electron/resources/js/resources/php/php artisan native:config
at ChildProcess.exithandler (node:child_process:430:12)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1091:16)
at Socket.<anonymous> (node:internal/child_process:449:11)
at Socket.emit (node:events:513:28)
at Pipe.<anonymous> (node:net:322:12) {
code: 1,
killed: false,
signal: null,
cmd: '/home/adammpkins/Development/NativePHP/vendor/nativephp/electron/resources/js/resources/php/php artisan native:config',
stdout: '\n' +
' ERROR Command "native:config" is not defined. Did you mean one of these? \n' +
'\n' +
' ⇂ native:build \n' +
' ⇂ native:install \n' +
' ⇂ native:migrate \n' +
' ⇂ native:minify \n' +
' ⇂ native:publish \n' +
' ⇂ native:queue \n' +
' ⇂ native:serve \n' +
'\n',
stderr: ''
}
I see commands for LoadPHPConfigurationCommand and LoadStartupConfigurationCommand but the application doesn’t seem to see them.
How to reproduce the bug
Install Laravel via
curl -s "https://laravel.build/NativePHP" | bash
require nativephp via
composer require nativephp/electron
Attempt to bring the application up with
php artisan native:serve
Package Version
0.4.0
PHP Version
8.2.0
Laravel Version
10
Node Version
20.3.1
Which operating systems does with happen with?
Linux
Notes
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 9
- Comments: 16 (3 by maintainers)
+1 on intel mac
A workaround which seems to work for me is adding this environment variable
NATIVEPHP_RUNNING=true@ThibautPV your issue is different. It seems you’ve installed your Composer dependencies under PHP8.2 while NativePHP currently uses PHP8.1.
This can be fixed by running
composer installwith PHP8.1.Alternatively, the version of PHP inside NativePHP needs to match your system. More PHP versions are coming soon.
db:seed also doesn’t work