Composer
Allowed memory size of … bytes exhausted [Solution]

Allowed memory size of … bytes exhausted [Solution]

Are you trying to install libraries in laravel and getting memory size issue? Well, again you have come to right place ?. The solution is very easy and today I am going to show you the solution.

Normal command to use composer

composer require <package-name>

// If you are in shared server
~/location-to-composer.phar require <package-name>

But to ignore memory size issue just add composer memory limit. Here is the code.

COMPOSER_MEMORY_LIMIT=-1 composer require <package-name>

// If you are using shared server.
COMPOSER_MEMORY_LIMIT=-1 ~/location-to-composer.phar require <package-name>

If you don’t know how to install composer in shared server click here.

That’s all guys. Hope this is helpful.

Cheers

Thanks

Leave a Reply