I can't run command "composer require classiebit/addchat-laravel-pro" on godady hosting server

Viewed 168

enter image description here

I bought source code from https://codecanyon.net/item/addchat-laravel-pro/25750268 and tried to install on my hosting server.

My hosting server is godady.

https://addchat-laravel-pro-docs.classiebit.com/docs/1.1/installation

This is install guide of addchat.

With putty, in terminal, I run the command https://addchat-laravel-pro-docs.classiebit.com/docs/1.1/installation and after that, I can see picture as follow;

If you have experience with addchat-laravel-pro and godady, please let me know.

I hope your help.

Thanks

when I run command "free -m", I can see picture as follow;

enter image description here

2 Answers

Problem:


You got the following error on your production server after using composer require classiebit/addchat-laravel-pro.

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Killed

Because your server is running out of memory.

Solution:


  1. You need to upgrade your server to one with more RAM.
  2. You should install that package first on your local development server and git push to your remote server. Once you have git pulled on your production server you should run composer install rather than composer update.

UPDATED:

$>which composer
/usr/local/bin/composer

$>php -d memory_limit=512M /usr/local/bin/composer require classiebit/addchat-laravel-pro

UPDATED AGAIN:

The solution is to use the COMPOSER_MEMORY_LIMIT environment variable, setting its value to -1. It can be added to the current Terminal session with

$ export COMPOSER_MEMORY_LIMIT=-1

After

$ COMPOSER_MEMORY_LIMIT=-1 composer require classiebit/addchat-laravel-pro

UPDATED (2020/12/20):

I see that 49930 MB memory are cached. You could try flush the memory cache on your system.

sync; echo 3 > /proc/sys/vm/drop_caches

It's better to upgrade to composer v2, it's very fast.

Try:

COMPOSER_MEMORY_LIMIT=-1 composer require PACKAGE_NAME
Related