Getting Error on composer run to install modules "VirtualAlloc"

0

Getting this error on "composer require drupal/module-name". I want to install a module on my drupal site but it always returns me this error.

VirtualAlloc() failed: [0x00000008] Not enough memory resources are available to process this command.


VirtualFree() failed: [0x000001e7] Attempt to access invalid address.


VirtualAlloc() failed: [0x00000008] Not enough memory resources are available to process this command.


VirtualFree() failed: [0x000001e7] Attempt to access invalid address.


Fatal error: Out of memory (allocated 1711276032) (tried to allocate 4096 bytes) in 
phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/Solver.php on 
line 223
drupal
composer-php
drupal-8
drupal-modules

2 Answers

0

Update on your php.ini file's: memory_limit= XXXM

Replace XXXM value by the memory that you wanna allocate.

Or replace XXXM by -1 to negate memory limit condition.

answered on Stack Overflow Oct 10, 2020 by Sharklalu
0

Virtual memory Error on composer run Solution (Windows)

  1. Download PHP 7.3+ and place on a folder on c drive
  2. Change the environment variable path of PHP to new php
  3. Set the memory limit to -1 in PHP 7.3+ ini file Also uncomment the required extensions.
  4. Run Composer
answered on Stack Overflow Oct 31, 2020 by Someshver Thakur • edited Feb 12, 2021 by Someshver Thakur

User contributions licensed under CC BY-SA 3.0