cancel
Showing results for 
Search instead for 
Did you mean: 

Vendor autoload is not found. Please run 'composer install' under application root directory. Ubuntu

Vendor autoload is not found. Please run 'composer install' under application root directory. Ubuntu

I am running mysql 8.0.29, php7,4 and apache 2

In browser I got message Vendor autoload is not found. Please run 'composer install' under application root directory.

 

In terminal I installed composer with command apt get install composer running composer install gives error .

 

composer install
PHP Parse error: syntax error, unexpected '|', expecting variable (T_VARIABLE) in /usr/share/php/Composer/IO/BaseIO.php on line 163

Parse error: syntax error, unexpected '|', expecting variable (T_VARIABLE) in /usr/share/php/Composer/IO/BaseIO.php on line 163

Please suggest.

1 REPLY 1

Re: Vendor autoload is not found. Please run 'composer install' under application root directory. Ub

Hello deepakdeshp,

 

I hope you are doing well!

 

The Errors in Magento can occur anytime, whether it is an installation error or development and admin errors.

 

The error with the message "vendor autoload is not found." please run "install composer." is an installation error. This error pop-ups when we try to install Magento 2 on your server or create a Magento 2 instance on your local machine. I know you are bored with this bug. Hence, you can follow the below steps to fix this error,

 

Open the Terminal using the shortcut key Ctrl + Alt + T.

Then, type cd\

You will have to navigate to your Magento 2 root directory, i.e., the location where you have kept your Magento 2 installation files.

For example: cd xampp/public_html/magento 2

Now, type the command 'composer install.'

For example: xampp/public_html/magento 2/composer install

 

The above command will import your packages and create a vendor folder, along with the autoload script. It will take around 20 minutes for the download to complete.

 

Nextly, Refresh the browser to check if the error has gone.

 

If the error still persists, you can try the below steps to encounter the issue,

 

You will have to try the below commands to fix this issue:

 

php bin/magento cache:clean ->  To clean particular cache types e.g.: config, layout etc.

php bin/magento cache:flush -> To clean the cache in the website

php bin/magento indexer:reindex -> Used to reindex all or selected indexers one time only

php bin/magento setup:upgrade -> It will update all Mirasvit modules installed in your store.

php bin/magento setup:static-content:deploy -f -> To deploy the static content

sudo chmod -R 777 var/ generated/ pub/ -> To give permission

 

After running the above commands, kindly refresh the browser and check whether the "composer install" error has been resolved or not.

 

I hope the fixes above help you to resolve the error.

 

----------------------

Regards,
Rex M