composer升级包之后,在服务器执行 php artisan 时候报了一个错误:
/vendor/composer/../markbaker/matrix/classes/src/Functions/adjoint.php Warning:require(/home/wwwroot/vendor/composer/../markbaker/matrix/classes/src/Functions/adjoint.php): failed to open stream: No such file or directory in /home/wwwroot/amazon_wsandos_com/thinkphp/library/think/Loader.php on line 676 Fatal error: require(): Failed opening required '/home/wwwroot/test_com/vendor/composer/../markbaker/matrix/classes/src/Functions/adjoint.php' (include_path='.:/usr/local/php/lib/php') in /home/wwwroot/amazon_wsandos_com/thinkphp/library/think/Loader.php on line 676
本地运行正常,可传到服务器上就出问题,可能是缓存造成。
1、先用使用命令:composer dump-autoload -o 直接报错 /vendor/composer/../markbaker/matrix/classes/src/Functions/adjoint.php
2、再试命令:composer clean-cache 和 composer update 也不行。
3、所以没办法,最后直接把线上的vendor文件删除,提交到线上。保证线上的也删除后,再执行
compsoer install
composer update
再提交到线上,运行成功!