#composer What should I do if I get an error when installing yii?
Composer Solution to the error when installing Yii2
Composer cannot generate the vendor directory and cannot download the vendor content .
And using the domestic free image, after setting it up, the request is still the official address?
After tinkering all day, I finally solved the problem of changing the V um P, and the download was completed.
I feel that the free mirror https://pkg.phpcomposer.com/ is really a scam.
No longer mirrors, but I don’t tell you, but directly redirect all requests. Redirect to the origin site.
1. Clear cache
composer clear-cache
2.Set available mirrors
composer config -g repos.packagist composer //m.sbmmt.compkg.org
3.require fxp
composer global require “fxp/composer-asset-plugin:dev-master”
4.Perform installation
composer install -vvv
5. Remove the customized image
composer config -g --unset repos.packagist
6. Error message
fxp/composer-asset-plugin v1.0.0 requires composer-plugin-api 1.0.0 -> no matching package found.
Solution
Remove extra.asset-installer-paths section in config Add the following configuration
"config": { "fxp-asset": { "installer-paths": { "npm-asset-library": "vendor/npm", "bower-asset-library": "vendor/bower" } }, }
Written at the end, why can the composer warehouse be blocked? I think it is incredible. The technology is self-blocking?
is also ridiculously magical.
The above is the detailed content of What should I do if composer gets an error when installing yii?. For more information, please follow other related articles on the PHP Chinese website!