Home > Development Tools > composer > What should I do if composer installation dependencies are slow?

What should I do if composer installation dependencies are slow?

藏色散人
Release: 2020-05-07 15:11:45
forward
2986 people have browsed it

The following tutorial column of composer will introduce to you the solution to the slow installation dependency of composer, and check the detailed execution log of composer. I hope it will be helpful to friends in need!

What should I do if composer installation dependencies are slow?

composer installation dependencies are slow, check composer’s detailed execution log

Installing composer dependencies on windows WSL

composer install
Copy after login

It was found that the execution was abnormally slow. It was suspected that the domestic mirror was not used, but github was directly accessed.

Need to see composer’s execution log

composer -h
Copy after login

I found that composer’s parameters support

 -v|vv|vvv, --verbose           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Copy after login

So

composer -vvv install
Copy after login

As expected, they all went to github. . .

Installing backpack/crud (3.2.27): Downloading https://api.github.com/repos/Laravel-Backpack/CRUD/zipball/54fb667a1cf64f4c53f8a90a3752d1f964fdec6f
Downloading (connecting...)
Following redirect (2) https://codeload.github.com/Laravel-Backpack/CRUD/legacy.zip/54fb667a1cf64f4c53f8a90a3752d1f964fdec6f
Copy after login

After I updated to the domestic mirror source of https://laravel-china.org/composer, I found that the installation was still done through github.

After checking, it turned out to be a problem with composer.lock. Delete composer.lock and run composer install to regenerate it. The reason is that composer.lock caches the previous configuration information, causing the new image configuration to be invalid.

For more composer technical articles, please visit the composer column. The address is: https://www.php.cn/tool/composer/

The above is the detailed content of What should I do if composer installation dependencies are slow?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:cnblogs.com
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