Spark input file cannot be opened
P粉759457420
P粉759457420 2023-11-02 09:40:22
0
1
747

I'm using PHP v8.1 and tried to open the Codeigniter (v4.2.10) welcome page using: php Sparkserve and got this error: Cannot open input file: spark . < /p>

I searched online and didn't find any relevant content. So I tried to install spark using composer: composer require sparkphp/spark but no luck. I get the following error:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires sparkphp/spark ^0.16.3 -> satisfiable by sparkphp/spark[0.16.3].
    - sparkphp/spark 0.16.3 requires destrukt/destrukt ^0.7.1 -> could not be found in any version, there may be a typo in the package name.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require sparkphp/spark:*" to figure out if any version is installable, or "composer require sparkphp/spark:^2.1" if you know which you need.

Installation failed, deleting ./composer.json.

Now I don't know what to do, thank you very much for your help.

P粉759457420
P粉759457420

reply all(1)
P粉356128676
Could not open input file: spark

means you are not in the Codeigniter root directory. Just go into the Codeigniter root directory and run the command. If you use Composer to create your application

composer create-project codeigniter4/appstarter project-root

Just go to the "Project Root" (any name you write)

cd project-root
php spark serve
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template