Laravel Installer throwing error - laravel

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.

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.

Related

How to install Laravel v5.2.15 when I have already installed v5.6.12?

I am trying to install a lower version of laravel when I have already installed a higher version in my htdocs. But it throws an error.
C:\xampp\htdocs\laravel-6>composer create-project laravel/laravel=5.2.15 s6
Installing laravel/laravel (v5.2.15)
- Installing laravel/laravel (v5.2.15): Loading from cache
Created project in s6
> php -r "copy('.env.example', '.env');"
> php artisan clear-compiled
PHP Warning: require(C:\xampp\htdocs\laravel-6\s6\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\laravel-6\s6\bootstrap\autoload.php on line 17
PHP Stack trace:
PHP 1. {main}() C:\xampp\htdocs\laravel-6\s6\artisan:0
PHP 2. require() C:\xampp\htdocs\laravel-6\s6\artisan:16
PHP Fatal error: require(): Failed opening required 'C:\xampp\htdocs\laravel-6\s6\bootstrap/../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\laravel-6\s6\bootstrap\autoload.php on line 17
PHP Stack trace:
PHP 1. {main}() C:\xampp\htdocs\laravel-6\s6\artisan:0
PHP 2. require() C:\xampp\htdocs\laravel-6\s6\artisan:16
Warning: require(C:\xampp\htdocs\laravel-6\s6\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\laravel-6\s6\bootstrap\autoload.php on line 17
Call Stack:
0.0007 344912 1. {main}() C:\xampp\htdocs\laravel-6\s6\artisan:0
0.0016 346488 2. require('C:\xampp\htdocs\laravel-6\s6\bootstrap\autoload.php') C:\xampp\htdocs\laravel-6\s6\artisan:16
Fatal error: require(): Failed opening required 'C:\xampp\htdocs\laravel-6\s6\bootstrap/../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\laravel-6\s6\bootstrap\autoload.php on line 17
Call Stack:
0.0007 344912 1. {main}() C:\xampp\htdocs\laravel-6\s6\artisan:0
0.0016 346488 2. require('C:\xampp\htdocs\laravel-6\s6\bootstrap\autoload.php') C:\xampp\htdocs\laravel-6\s6\artisan:16
Script php artisan clear-compiled handling the pre-update-cmd event returned with error code 255
But when I tried installing laravel v5.6.12, it gets installed easily again. Please tell me a way around to install a lower version of laravel while keeping the higher version. Thanks.
Errors:Updates suggested by a member
I was suggested to download laravel's particular version manually and I did also tried to update composer but still facing problem. The error that has occurred is shown below:
Have you tried using this command to install a clean copy of laravel 5.2.15?
composer create-project --prefer-dist laravel/laravel laravelProjectFolder "5.2.15"

Laravel 5 issue : libraries/admin/ does not exist and could not be created

I'm trying to install laravel from git. I cloned the repository and tried the command
php artisan serve
But It gave this error message.
Warning:
require(C:\wamp64\www\reguard\bootstrap/../vendor/autoload.php):
failed to open stream: No such file or directory in
C:\wamp64\www\reguard\bootstrap\autoload.php on line 17
Fatal error: require(): Failed opening required
'C:\wamp64\www\reguard\bootstrap/../vendor/autoload.php'
(include_path='.;C:\php\pear') in
C:\wamp64\www\reguard\bootstrap\autoload.php on line 17
and I ran a composer install
But it stopped with this error,
[RuntimeException] libraries/admin/ does not exist and could not be
created.
So I ran a composer du as the first comment but now getting this,
[Symfony\Component\Debug\Exception\FatalErrorException] Class
'R2S\Admin\Providers\AdminServiceProvider' not found
Hope someone can help.

anyone got an error i get while installing teepluss/theme in laravel

I wanted to install teepluss/theme so I added it to my composer.json
but now I get this error:
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'SuperClosure\Serializer' not found
I was capable to solve the first error by adding >"jeremeamia/superclosure": "^2.0"
but now when I add >Teepluss\Theme\ThemeServiceProvider::class, in app.php providers I get a new error :
> [ErrorException] Illegal offset type in unset
here's what i got in the script in composer.json
If you already run composer update, you can try run this script
php artisan config:cache
and
php artisan cache:clear.It can help you resolve that problem

Laravel composer autoload/ guzzlehttp : fatal error

When deploying my Laravel website (1&1 mutualized), this is the fatal error I get:
Fatal error: require(): Failed opening required '/homepages/41/d623699018/htdocs/athyr/athyr - copie/athyrcopie/vendor/composer/../guzzlehttp/psr7/src/functions_include.php' (include_path='.:/usr/lib/php7.0') in /homepages/41/d623699018/htdocs/athyr/athyr - copie/athyrcopie/vendor/composer/autoload_real.php on line 66
I already tried composer update & composer dump_autoload. And I checked that it's PHP 7 everywhere.
Have you tried:
php artisan optimize

Fresh CentOS 7, first Laravel Installation.Composer install breaks

I am fallowing this tutorial:
http://linoxide.com/linux-how-to/install-laravel-php-centos-7-ubuntu-15-04/
And on step 5) when running composer install in the project directory it starts to do staff, as expected, until this happened:
Illuminate\Foundation\ComposerScripts::postInstall
> php artisan optimize
PHP Fatal error: Undefined constant 'Illuminate\Session\TokenMismatchException' in /var/www/laravel-develop/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 779
PHP Fatal error: Undefined constant 'Illuminate\Session\TokenMismatchException' in /var/www/laravel-develop/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 779
Script php artisan optimize handling the post-install-cmd event returned with error code 255
What is the problem?
Thanks, Aleks
start creating a project (after updating composer) instead of downloading the referenced file do the following
from your terminal type in cd /var/www/
then type composer create-project laravel/laravel laravel-develop
your composer should download the latest version of Laravel
try it this way feel free to ask any questions.
Good Luck

Resources