Skip to content
Advertisement

Failed while installing a package using composer

iam tryin to use a cart package by using this command

composer require jason-napolitano/codeigniter4-cart-module

and it’s failed. this is what it said

JavaScript

is it because my minimum-stability in composer.json is set to “stable”?

Advertisement

Answer

I presume you created your project by using composer create-project codeigniter4/framework. This effectively created a clean project for you without the .git folder, thus removing any metadata on what version of codeigniter4/framework package you installed. This is indicative by 1.0.0+no-version-set part of the error message.

The jason-napolitano/codeigniter4-cart-module package requires ^4.0.3 version of codeigniter4/framework, but since you have no version metadata in your project, install fails. This can be resolved by setting the version from which you bootstrapped your project manually in your root composer.json:

JavaScript

However, this is just a guess, since I have no insight into your main composer.json.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement