调用bash命令时出现此错误 laravel新项目
php -r“copy('。env.example','。env');” php artisan clear-compiled
Warning: require(/Users/Dale/Desktop/Outstanding Projects/project/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /Users/Dale/Desktop/Outstanding Projects/project/bootstrap/autoload.php on line 17
Fatal error: require(): Failed opening required '/Users/Dale/Desktop/Outstanding Projects/project/bootstrap/../vendor/autoload.php' (include_path='.:') in /Users/Dale/Desktop/Outstanding Projects/project/bootstrap/autoload.php on line 17
Script php artisan clear-compiled handling the post-install-cmd event returned with an error
之前有人遇到过这个问题。
答案 0 :(得分:4)
我假设您使用composer来安装Laravel。
Laravel在autoload.php
目录中找不到您的vendor
文件。试试composer install
和composer dumpautoload
。还要检查autoload.php
是否在目录中。
autoload.php
的路径应位于bootstrap/autoload.php
文件中,检查您的系统路径是否正确。