diode
diode copied to clipboard
Package artisan commands not working
Very cool idea!
Just gave it a try, running MacOS 13.3.1 (a) M1.
It looks like the composer dump-autoload is not working. If I install for example Laravel Breeze, like so:
diode composer require laravel/breeze --dev
diode artisan breeze:install blade
It gives the following error:
Command "breeze" is not defined.
To fix this, you'll need to run:
diode artisan package:discover --ansi
This when rerunning diode artisan breeze:install blade you'll get:
+----------------+
| diode ---▶|--- |
+----------------+
INFO running artisan breeze:install blade
INFO Installing and building Node dependencies.
Symfony\Component\Process\Exception\LogicException
The Process class relies on proc_open, which is not available on your PHP installation.
If you then run the npm run dev separately, Breeze will work.
proc not working was mentioned as a caveat. So that is a known issue.
Edit 1:
After some digging found that diode composer dump-autoload results in:
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
In EventDispatcher.php line 423:
Failed to locate PHP binary to execute
Hey @aschmelyun,
I hit the similar issue. Installed FilamentPHP package and tried running diode artisan make:filament-user. Here's the output:
diode artisan make:filament-user
+----------------+
| diode ---▶|--- |
+----------------+
INFO running artisan make:filament-user
ERROR Command "make:filament-user" is not defined. Did you mean one of these?
⇂ make:cast
⇂ make:channel
⇂ make:command
⇂ make:component
⇂ make:controller
⇂ make:event
⇂ make:exception
⇂ make:factory
⇂ make:job
⇂ make:listener
⇂ make:mail
⇂ make:middleware
⇂ make:migration
⇂ make:model
⇂ make:notification
⇂ make:observer
I tried running diode artisan and the commands of Filament don't show up. Then I followed @jeffreyvr's advice, and ran diode artisan package:discover --ansi. Weirdly enough, although the commands do show up after running diode artisan again, the output of package:discoverdoesn't show Filament package as discovered as can be seen below.
diode artisan package:discover --ansi
+----------------+
| diode ---▶|--- |
+----------------+
INFO running artisan package:discover --ansi
INFO Discovering packages.
laravel/sail .......................................................... DONE
laravel/sanctum ....................................................... DONE
laravel/tinker ........................................................ DONE
nesbot/carbon ......................................................... DONE
nunomaduro/collision .................................................. DONE
nunomaduro/termwind ................................................... DONE
spatie/laravel-ignition ............................................... DONE
The command then fails with the error message below:
diode artisan make:filament-user
+----------------+
| diode ---▶|--- |
+----------------+
INFO running artisan make:filament-user
Name:
>
ErrorException
fgets(): Read of 8192 bytes failed with errno=29 I/O error
at vendor/symfony/console/Helper/QuestionHelper.php:529
525▕ private function readInput($inputStream, Question $question): string|false
526▕ {
527▕ if (!$question->isMultiline()) {
528▕ $cp = $this->setIOCodepage();
➜ 529▕ $ret = fgets($inputStream, 4096);
530▕
531▕ return $this->resetIOCodepage($cp, $ret);
532▕ }
533▕
+23 vendor frames
24 artisan:37
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
WASM ERROR
Program terminated with exit(1)
/Users/gjakic/.nvm/versions/node/v20.3.0/lib/node_modules/diode-cli/node_modules/@php-wasm/node/index.cjs:3630
throw reason;
^
ExitStatus: Program terminated with exit(1)
at _proc_exit (/Users/gjakic/.nvm/versions/node/v20.3.0/lib/node_modules/diode-cli/node_modules/@php-wasm/node/index.cjs:8457:17)
at exitJS (/Users/gjakic/.nvm/versions/node/v20.3.0/lib/node_modules/diode-cli/node_modules/@php-wasm/node/index.cjs:8464:5)
at dynCall_vi (wasm://wasm/0274e61e:wasm-function[12106]:0x63150b)
at ret.<computed> (/Users/gjakic/.nvm/versions/node/v20.3.0/lib/node_modules/diode-cli/node_modules/@php-wasm/node/index.cjs:9698:33)
at runtime.asm.<computed> (/Users/gjakic/.nvm/versions/node/v20.3.0/lib/node_modules/diode-cli/node_modules/@php-wasm/node/index.cjs:66760:18)
at invoke_vi (/Users/gjakic/.nvm/versions/node/v20.3.0/lib/node_modules/diode-cli/node_modules/@php-wasm/node/index.cjs:10384:7)
at run_cli (wasm://wasm/0274e61e:wasm-function[9934]:0x5591cc)
at ret.<computed> (/Users/gjakic/.nvm/versions/node/v20.3.0/lib/node_modules/diode-cli/node_modules/@php-wasm/node/index.cjs:9698:33)
at runtime.asm.<computed> (/Users/gjakic/.nvm/versions/node/v20.3.0/lib/node_modules/diode-cli/node_modules/@php-wasm/node/index.cjs:66760:18)
at Module._run_cli (/Users/gjakic/.nvm/versions/node/v20.3.0/lib/node_modules/diode-cli/node_modules/@php-wasm/node/index.cjs:10218:66) {
status: 1
}
Node.js v20.3.0
Hope this helps.
Thanks for all the great work so far, g