今天小编给大家分享一下composer依赖报错问题如何解决的相关知识点,内容详细,逻辑清晰,相信大部分人都还太了解这方面的知识,所以分享这篇文章给大家参考一下,希望大家阅读完这篇文章后有所收获,下面我们一起来了解一下吧。
composer依赖报错
如果遇到类似错误可以做如下操作
step1:
备份
composer.lock
(laravel 项目根目录下)step2:
删除
composer.lockstep2:
执行
composer install
step3:
恢复
composer.lock
(恢复后再执行是为了将之前 lock 的依赖回撤到最初的版本)step4:
执行
composer install
**Warning**: require(/www/laravel_project/vendor/composer/../../app/Helpers/function.php): Failed to open stream: No such file or directory in **/www/laravel_project/vendor/composer/autoload_real.php** on line **41**
Fatal error: Uncaught Error: Failed opening required '/www/laravel_project/vendor/composer/../../app/Helpers/function.php' (include_path='.:') in /www/laravel_project/vendor/composer/autoload_real.php:41 Stack trace: #0 /www/laravel_project/vendor/composer/autoload_real.php(45): {closure}() #1 /www/laravel_project/vendor/autoload.php(25): ComposerAutoloaderInitde606b2f13a1aa4c0ed37f7d2e9ac0d5::getLoader() #2 /www/laravel_project/public/index.php(34): require('...') #3 {main} thrown in /www/laravel_project/vendor/composer/autoload_real.php on line 41