本篇文章给大家带来了关于composer的相关知识,其中主要跟大家聊一聊如果你遇到composer依赖报错问题改怎么办?感兴趣的朋友下面一起来看一下吧,希望对大家有帮助。
composer依赖报错
如果遇到类似错误可以做如下操作
step1:
备份 composer.lock
(laravel 项目根目录下)
step2:
删除
composer.lock
step2:
执行 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
登录后复制
推荐学习:《composer使用教程》