Why composer package not install - php

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.

Related

failed to install laravel via composer, failed to install symfony

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

Install package with composer

I want to install a package with the composer. I input the next command:
composer global require package-name
installed a package with package-name from packagist.org, but I want to install a local package with the same name.
Please, prompt me, how I can explain the composer, that it must install a local package?

Laravel Intervention ImageServiceProvider not found

I'm facing a problem with my online environment, on my localhost using Laragon, everything worked without any problems.
My online environment
-- My composer version 1.8.5
-- My laravel version 5.8
-- My PHP version 7.3.0
-- Fileinfo support enable
-- GD Support enabled / Version bundled (2.1.0 compatible)
-- No Imagick PHP extension installed
I followed exactly the installation instructions on the official website.
php composer.phar require intervention/image
Add config/app.php $providers: Intervention\Image\ImageServiceProvider::class
Add config/app.php $alias: 'Image' => Intervention\Image\Facades\Image::class
The problem starts now. When I try to run the statement:
$ php artisan vendor:publish --provider="Intervention\Image\ImageServiceProviderLaravel5"
I get the following message
[waservice#web7081 portal]$ php artisan vendor:publish --provider="Intervention\Image\ImageServiceProviderLaravel5"
In ProviderRepository.php line 208:
Class 'Intervention\Image\ImageServiceProvider' not found
Dump-autoload command, I get the following return:
[waservice#web7081 ~]$ php composer.phar dump-autoload
Generated autoload files containing 0 classes
Optimized dump-autoload command, I get the following return:
[waservice#web7081 ~]$ php composer.phar dump-autoload -o
Generated optimized autoload files containing 156 classes
Here is part of my composer.json code
"require": {
"php": "^7.1.3",
"fideloper/proxy": "^4.0",
"laravel/framework": "5.8.*",
"laravel/tinker": "^1.0",
"intervention/image": "dev-master"
},
Return of my composer update:
[waservice#web7081 ~]$ php composer.phar update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
Return of my composer install
[waservice#web7081 ~]$ php composer.phar install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files
Return of the intervention image installation command
[waservice#web7081 ~]$ php composer.phar require intervention/image
Using version ^2.4 for intervention/image
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
The intervention folder is present in the project vendor folder
I have no idea what may be happening, in Internet search I also find no solution, always the same instructions that are the ones on the developer's own site.
check if when installing intervention/image you were in the correct route of the project.

Composer error while installing magento

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.

Download composer packages before install

I want to force to composer to download all packages before to install it and to speedup the dependencies installation on projects.
On production environment, I don't want to wait to packages download, it must be installed from cache.
Something like:
$> composer download-install # Currently not exists
$> composer install # Install from previously cached packages.
There are any composer option to do it?
Thanks!
There's a composer package that does exactly that!
Require it globally like this:
$ composer global require hirak/prestissimo
Then just a regular composer install will prefetch all the packages first and then install them as if they're from cache.
$ composer install
Read more at https://github.com/hirak/prestissimo

Categories