0

I'm getting this error when calling the bash command laravel new project

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 

Anyone come across this before.

1 Answer 1

4

I assume you used composer to install Laravel.

Laravel can't find your autoload.php file in vendor directory. Try composer install and composer dumpautoload. Also check if autoload.php is in directory.

Path to autoload.php should be in bootstrap/autoload.php file, check if path is correct with your system.

Sign up to request clarification or add additional context in comments.

Comments