First steps with Laravel 5 on MacOSX running MAMP PRO stack.
php artisan
I got the following error:
[RuntimeException]
Error Output: PHP Warning:
require(/Users/../../bootstrap/../vendor/autoload.php): failed to open
stream: No such file or directory in
/Users/../../bootstrap/autoload.php on line 17
PHP Fatal error: require(): Failed opening required
'/Users/../../bootstrap/../vendor/autoload.php' (include_p
ath='.:/Applications/MAMP/bin/php/php5.6.10/lib/php') in
/Users/../../bootstrap/autoload.php on line 17
It seems to be related with some bootstrap autoload and MAMP php binaries... But this is as far as I can understand this.
Can I have some advices please?
If I run composer update instead, I do get the same Fatal Error.
It seems you have give a wrong path,re install the laravel.
Thank you for your answers.
I had some issues with composer assets plugin. I have:
1) Remove the folder related to the composer assets plugin.
2) Reinstalled.
3) go to the root diretory of my laravel project.
4) run sudo composer install
Runned php artisan and all seems to be working as expected.
Thank you so much for your time.
Related
I installed jetstream and livewire. After installation I got this error
Illuminate\Support\ServiceProvider::loadRoutesFrom(): Failed opening required 'D:\xampp\htdocs\suo\webapp\vendor\laravel\jetstream\src/../routes/.php' (include_path='D:\xampp\php\PEAR')
I tried to clear cache using following command
php artisan config:cache
But it also shows many warnings and then this error
Symfony\Component\ErrorHandler\Error\FatalError
Couldn't find any working solution. Any idea?
I have uploaded my Laravel project on ubuntu server via putty terminal.
Composer installed on server machine but when i run any artisan command it gives an error.
$ php artisan serve
ErrorException
require(/var/www/html/healthapi.fynity.in/routes/api/v1/api.php): failed to open stream: No such file or directory
The api.php is already there but i don't know why this error comes. Tried all the solutions from google.
Problem:
You may have changed something earlier such as the name or the path of the file.
Solution:
First of all, you use the following command to clear all configs.
$ php artisan config:clear
Then, you run again the following command.
$ php artisan serve
Update (2021/01/07):
You got the following error:
ErrorException require(/var/www/html/healthapi.fynity.in/routes/api/v1/api.php): failed to open stream: No such file or directory at vendor/laravel/framework/src/Illuminate/Routing/RouteFileRegistrar.php:35 31
It seems that the library is not fully installed. You should update the library with the following command:
$ composer update
Then, you run again the following command:
$ php artisan serve
I have this weird situation: I've cloned all my repositories from github in a new local machine running Mac OsX some of them has Laravel framework installed but only some of these can execute the cmd php artisan.
I've tried to check permission on folders, uninstall/re-install composer and I've also tried to install a fresh version of Laravel. Another problem is that running the command doesn't output anything - no errors, nothing - only a new empty line of the terminal.
The only thing I know is that if I clone one of the repositories, then run composer install it throws Script php artisan optimize handling the post-install-cmd event returned with error code 255.
Thanks
Update 1:
I've found running composer install -vvv -o that composer throw this error
Warning: require(/Users/USERNAME/laravel/bootstrap/autoload.php): failed to open stream: No such file or directory in /Users/USERNAME/laravel/artisan on line 16
Fatal error: require(): Failed opening required '/Users/USERNAME/laravel/bootstrap/autoload.php' (include_path='.:') in /Users/USERNAME/laravel/artisan on line 16
Update 2:
It seems that cmd git clone didn't copy that autoload file bootstrap/autoload.php for some reason that I don't understand at all.
I've imported the file manually from github and run, removed the vendor folder then run again composer install --no-scripts but still having the problem with artisan and if I run composer update it throw Script php artisan optimize handling the post-update-cmd event returned with error code 255
I had to re-install laravel and copy files manually to make it works again.
I created a new Laravel 5.5 project with this command:
laravel new crud-angular
After then, run this command inside the project folder:
php artisan key:generate
At that moment, I got such error:
Warning: require(F:\Study\Laravel\crud-angular/vendor/autoload.php):
failed to open stream: No such file or directory in
F:\Study\Laravel\crud-angular\artisan on line 18
Fatal error: require(): Failed opening required
'F:\Study\Laravel\crud-angular/vendor/autoload.php'
(include_path='.;C:\php\pear') in
F:\Study\Laravel\crud-angular\artisan on line 18
I used wampserver 3.0.6 for this project.
Hope to help me.
Thanks
Make sure you have run:
composer install
Now it seems packages are not installed. If they are, try running:
composer dump-autoload
Try to to give permission for that vendor folder
sudo chmod -R 777 vendor
update your composer also
composer update
this will fix your issue
Most likely you forgot to Install composer just run composer install
Installed Laravel Framework and getting Error when I install artisian with the below (php artisan migrate:install)
My PHP version is [PHP: 5.5.11]
Parse error: syntax error, unexpected '[' in E:\xampp\htdocs\laravel-testing\vendor\laravel\framework\src\Illuminate\Support\helpers.php on line 426
E:\xampp\htdocs>cd laravel-testing
E:\xampp\htdocs\laravel-testing>php artisan migrate:install
Parse error: **syntax error, unexpected '['** in E:\xampp\htdocs\laravel-testing\vendor\laravel\framework\src\Illuminate\Support\helpers.php on line 426
What may be the problem ?
I would suggest to remove older version of your php and set latest version in environment variable. Secondly I would recommend to read this article. It's definitely going to help you understand migration.
Make sure you have composer installed in the VM (Vagrant) if you are not using homestead (laravel specific vagrant dist)
I was getting the same error. Wondering why the PHP version would matter if the VM was using a single and correct PHP dist.
https://getcomposer.org/download/