I am trying to install Magento multistore and I have installed composer but still, I am getting this error..
Vendor autoload is not found.
Please run 'composer install' under application root directory.
It sounds like you have installed the composer.exe but not actually run the command composer install in your terminal.
This will install all your dependencies.
You should probably read the documentation here.
Related
i just installed laravel for the first time and got this error, i have reinstalled Composer many times but it doesn't work, maybe you guys can help me out
PHP version 8.2
i installed laravel global installer, but it shows symfony things error, i have reinstalled composer but it doesn't work
please see this url ( installation laravel)
first: install composer on OS (Linux , Windows or MAC)
If you have already installed Composer, you must be clear chache in composer:
php composer.phar clear-cache
or this command:
composer clear-cache
then Using installation via composer:
composer create-project laravel/laravel example-app
I have an application that I want to install for local development on my laptop with Docker. The application requires libraries from composer.
I would like to avoid installing PHP on my laptop and all necessary extensions just to be able to run composer.
I also don't want to run composer during the build inside of my application container, because I need the vendor folder on my local computer using mount binding.
It looked like the perfect solution to me to install composer though a docker container as explained here:
docker run --rm --interactive --tty \
--volume $PWD:/app \
composer install
However, when doing so, how do you resolve any PHP dependency conflicts?
For example
docker run --rm --interactive --tty \
--volume $PWD:/app \
composer require phpoffice/phpspreadsheet
will fail with
Using version ^1.14 for phpoffice/phpspreadsheet
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- phpoffice/phpspreadsheet 1.14.1 requires ext-gd * -> the requested PHP extension gd is missing from your system.
- phpoffice/phpspreadsheet 1.14.0 requires ext-gd * -> the requested PHP extension gd is missing from your system.
- Installation request for phpoffice/phpspreadsheet ^1.14 -> satisfiable by phpoffice/phpspreadsheet[1.14.0, 1.14.1].
How can I solve this kind of problems?
When the environment where you are running install, update or require commands is different from the environment where you are going to execute the code, and if you are absolutely certain that these dependencies are going to be met when the code is actually run, you do not need to check them during installation.
Just use --ignore-platform-reqs (docs).
What I usually put in my Dockerfiles when creating images for this kind of project is something like this, the the very minimum:
composer install --ignore-platform-reqs --prefer-dist
The whole thing goes like this if the artefact is being prepared for production:
composer install --ignore-platform-reqs --prefer-dist --no-scripts \
--no-progress --no-suggest --no-interaction --no-dev --no-autoloader
A couple additional steps to dump-autoload and execute post-install scripts are going to be needed in this case.
You do not elaborate how are you planning on running the result of this installation afterwards, so I'm not sure that part will be relevant for you.
Note: this is not particularly "docker" dependant. This strategy would apply any time you are creating an installation on a different machine than were you plan on running the installation.
My laravel installer just hang when i try to install laravel through composer.
I have installed the composer.Then i went to the command prompt and type the command
"composer create-project --prefer-dist laravel/laravel blog"
But it appeared and not doing anything further
Try clearing composer cache
composer clearcache
If still doesn't work
Try using laravel installer for it
https://laravel.com/docs/7.x/installation#installing-laravel
I tried install package watson/rememberable on localhost and it's installed successfully but when tried install it on shared hosting package killed and added package name to composer.json file, but not installed source code to vendor folder. I tried install package by clearing composer & Laravel caches but package not installed. How I can install it correctly?
To install the most recent version, run the following command:
composer require watson/rememberable
OR
Add to composer.json file:
"require": {
"watson/rememberable": "^3.1",
},
After, Run this command in the command prompt: composer update
Maybe you are in production mode. In the .env file change:
APP_ENV=local
Then try installing again.
I have done setup for mongodb on my system with Yii2 basic.
I have also installed the extension for mongodb (yii2-mongodb) inside a directory /vendor/yiisoft and checked for the permissions.
Now I am testing the connection with a controller and model but I am getting the following error.
PHP Fatal Error – yii\base\ErrorException Class
'yii\mongodb\ActiveRecord' not found
Is there anything that needs to be installed?
Have you install yii2/mongodb by composer ^^?
composer require --prefer-dist yiisoft/yii2-mongodb
Or your try follow this official Yii2 document step by step maybe can help you up :)!
In this case I tried following command before updating composer to fulfill the packages that need to update the composer
sudo apt-get update
sudo apt-get install php7.0-xml
most likely you are missing mbstring too . If you get the error install this package as well.
sudo apt-get install php-mbstring
then run
composer require --prefer-dist yiisoft/yii2-mongodb
composer update
Will work!!!