Home > Development Tools > composer > What should I do if composer gets an error when installing yii?

What should I do if composer gets an error when installing yii?

藏色散人
Release: 2020-04-08 10:49:04
Original
2758 people have browsed it

What should I do if composer gets an error when installing yii?

#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
Copy after login

2.Set available mirrors

composer config -g repos.packagist composer //m.sbmmt.compkg.org
Copy after login

3.require fxp

composer global require “fxp/composer-asset-plugin:dev-master”
Copy after login

4.Perform installation

composer install -vvv
Copy after login

5. Remove the customized image

composer config -g --unset repos.packagist
Copy after login

6. Error message

fxp/composer-asset-plugin v1.0.0 requires composer-plugin-api 1.0.0 -> no matching package found.
Copy after login

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"
            }
        },
    }
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template