I have recently installed Laravel via Composer but I keep get the following error:
Warning:
require(/home/leovoon/public_html/laravel-eee/bootstrap/../vendor/autoload.php):
failed to open stream: No such file or directory in
/home/leovoon/public_html/laravel-eee/bootstrap/autoload.php on line
17Fatal error: require(): Failed opening required
‘/home/leovoon/public_html/laravel-eee/bootstrap/../vendor/autoload.php’
(include_path=’.:/opt/cpanel/ea-php71/root/usr/share/pear’) in
/home/leovoon/public_html/laravel-eee/bootstrap/autoload.php on line
17
Am I missing something? Because I followed it step by step.
6
Answers
Run composer with –no-scripts
This shall fix the issue.
You must provide Read and write permissions to your project and generate a key in your .env file
Run the following commands inside your project dir and you would be good to go :
You got an error because you have missing vendor folder in your project, You need
/vendor
because all your packages are there, including all the classes Laravel uses. The vendor directory contains your Composer dependencies.Your problem can be resolved after following this step. you can try it:
With this command, you will re-create the vendor folder in your project and after that your project will start working normally.
While Going Live This is my Project Structure
NOTE:WHILE DOING THIS YOU MAY ENCOUNTER SOME STYLE AND JAVASCRIPT REFERENCE ERROR
IF YOU ARE USNIG
ASSET FUNCTION
NO NEED TO WORRYBUT IF NOT IF WILL OCCUR 404 IN SOME CASES
this is Just For Example
step4: open your
index.php
file and make the following changesto
AND
to
and then upload your project to live cpanel server
here is my cpanel server directory structure
hope it helps if the answer is not clear please comment below if the error continues
I got this error after trying to start the dev server using
php artisan serve
This is how I resolved it:
composer install
In case you get an error like "Your requirements could not be resolved to an installable set of packages", make sure you have the necessary extensions enabled in your php.ini config.
In my case I needed to enable
extension=fileinfo
composer update
. After this you should be able to start the server with no errors.You must provide Read and write permissions to your project and generate a key in your .env file
You must provide Read and write permissions to your project and generate a key in your .env file