What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

hi i want to install composer package to my project but every time i got the error: `vagrant@vm-b2c-

USLUHK9SQ
USLUHK9SQ Posts: 92 🧑🏻‍🚀 - Cadet

hi i want to install composer package to my project but every time i got the error:
vagrant@vm-b2c-demo-shop ➜ current git:(operation-new-products) ✗ composer require spryker/product-api

   `1/10: <http://repo.packagist.org/p/provider-2020-01$aff0193cae09496aac56564ab0f8a74e6d354935f27495e95f2c9222aeaa0916.json>`
`2/10:       <http://repo.packagist.org/p/provider-latest$c985b49991005d603f943404b7312ef0dcd5744956a8764c856bdc866e9cbdcd.json>`
`3/10:       <http://repo.packagist.org/p/provider-2019$621a7d57352137169920fc496aadfae7ef3d77e6d0ac1593c4c60d402d66d215.json>`
`4/10:       <http://repo.packagist.org/p/provider-2019-04$99a139393edd93b34895875515d5c37b59a474343f543d8abdf5e439b3709112.json>`
`5/10:       <http://repo.packagist.org/p/provider-2019-10$2fb50572e5670496467a44e2b2df36793f0d0df010125c3615cad99ade11b5ff.json>`
`6/10:       <http://repo.packagist.org/p/provider-2015$24b1e51a03ba26d11c22a65895f50230b431cb760d5737d99ffb1258ed71fd17.json>`
`7/10:       <http://repo.packagist.org/p/provider-2017$6176f0a07fdcfd1c9feae84adc9cd16c77b68c3d00f7e756642aa716c98ecdd8.json>`
`8/10:       <http://repo.packagist.org/p/provider-2019-07$6a2eacef2b237e2c2a0f551a73ef72702572c0510379383e338fe92e357c34fa.json>`
`9/10:       <http://repo.packagist.org/p/provider-2016$da85204da998c57690d51a8efef67714c75be5a6725de45c2dbeb13b6e4638a5.json>`
`10/10:      <http://repo.packagist.org/p/provider-2018$b2122a7e48ee0440fabba732a9aeb3e3806c252203e16d82fec54f02c68dd63c.json>`
`Finished: success: 10, skipped: 0, failure: 0, total: 10`

Using version ^0.1.4 for spryker/product-api
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
PHP Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 268435464 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleSet.php on line 84

Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 268435464 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleSet.php on line 84

Check <https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors> for more info on how to handle out of memory errors.%

Comments

  • UK5DS29L2
    UK5DS29L2 Posts: 546 🧑🏻‍🚀 - Cadet

    another temporary solution is to create a swapfile, run composer command
    remove a swapfile

    although adding more ram (or adjusting PHP config if that's the problem here) is definitely a better option in the long term