[Solved] PHP Fatal error: Allowed memory size bytes exhausted (tried to allocate 67108872 bytes) in Composer/DependencyResolver/RuleSet.php on line 83

Updated: 14th October 2022
Tags: php composer

If you having trouble when running composer require some package and getting error like

PHP Fatal error:  Allowed memory size of 1610612736 bytes exhausted (tried to allocate 67108872 bytes) in composer.phar/src/Composer/DependencyResolver/RuleSet.php on line 83

It means composer settings to use 128mb is low for this package. To solve this you need to run

php -d memory_limit=-1 C:\ProgramData\ComposerSetup\bin\composer.phar update

change composer path as it in your system