PS C:\laragon\www\ci4> php spark serve


Fatal error: Uncaught TypeError: CodeIgniter\CLI\Console::__construct(): Argument #1 ($app) must be of type CodeIgniter\CodeIgniter, int given, called in C:\laragon\www\ci4\spark on line 48 and defined in C:\laragon\www\ci4\vendor\codeigniter4\framework\system\CLI\Console.php:29

Stack trace:

#0 C:\laragon\www\ci4\spark(48): CodeIgniter\CLI\Console->__construct(1)

#1 {main}

  thrown in C:\laragon\www\ci4\vendor\codeigniter4\framework\system\CLI\Console.php on line 29


try this
> copy the index.php file in vendor/codeigniter4/framework/public/index.php (to) public/index.php
>copy spark file in vendor/codeigniter4/framework/spark (to) root folder