question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Couldn't allocate enough memory

See original GitHub issue

Describe the bug yarn workspace @packages/package bundle does not work as expected `

➤ YN0019: │ yargs-parser-npm-20.2.9-a1d19e598d-8bb69015f2.zip appears to be unused - removing ➤ YN0019: │ yargs-parser-npm-9.0.2-a0a3214d46-59276dc17b.zip appears to be unused - removing ➤ YN0019: │ yauzl-npm-2.10.0-72e70ea021-7f21fe0bba.zip appears to be unused - removing ➤ YN0019: │ zen-observable-ts-npm-1.2.3-4a54eb0466-0548b555c6.zip appears to be unused - removing ➤ YN0019: │ zwitch-npm-1.0.5-5911cef6ce-28a1bebaca.zip appears to be unused - removing ➤ YN0000: └ Completed in 2s 686ms ➤ YN0000: ┌ Link step ➤ YN0007: │ type-graphql@npm:1.1.1 [a5641] must be built because it never has been before or the last one failed ➤ YN0007: │ dtrace-provider@npm:0.8.8 must be built because it never has been before or the last one failed ➤ YN0007: │ @apollo/protobufjs@npm:1.0.5 must be built because it never has been before or the last one failed ➤ YN0007: │ core-js@npm:3.8.2 must be built because it never has been before or the last one failed ➤ YN0007: │ jss@npm:9.8.7 must be built because it never has been before or the last one failed ➤ YN0007: │ type-graphql@npm:1.1.1 [422b9] must be built because it never has been before or the last one failed ➤ YN0007: │ type-graphql@npm:1.1.1 [00665] must be built because it never has been before or the last one failed ➤ YN0000: └ Completed in 4s 506ms ➤ YN0000: Creating archive ➤ YN0000: Copying files to archive ➤ YN0001: Error: Couldn’t allocate enough memory at Qr.allocateBuffer (/Users/project/.yarn/releases/yarn-3.0.2.cjs:177:21994) at Qr.allocateSource (/Users/project/.yarn/releases/yarn-3.0.2.cjs:177:22426) at Qr.setFileSource (/Users/project/.yarn/releases/yarn-3.0.2.cjs:177:22684) at Qr.writeFilePromise (/Users/project/.yarn/releases/yarn-3.0.2.cjs:177:26970) at Woe.g (/Users/project/.yarn/releases/yarn-3.0.2.cjs:172:9287) at async vN (/Users/project/.yarn/releases/yarn-3.0.2.cjs:172:7182) at async Qr.copyPromise (/Users/project/.yarn/releases/yarn-3.0.2.cjs:172:13426) at async /Users/project/.yarn/plugins/@ojkelly/plugin-build.cjs:44:2003 at async Function.start (/Users/project/.yarn/releases/yarn-3.0.2.cjs:275:2287) at async /Users/project/.yarn/plugins/@ojkelly/plugin-build.cjs:44:1567 ➤ YN0000: Failed with errors in 12s 399ms

To Reproduce

  1. yarn workspace @packages/package bundle

Expected behavior Creates a bundle

Desktop (please complete the following information):

  • OS: macOS

Additional context Yarn bundle version: latest Yarn berry version: yarn-3.0.2.cjs

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
valdestroncommented, Nov 26, 2021

It seemed that my directory contained some docker volume like tmp

  • postgres-data
  • redis-data
  • amqp-data

and so on, this boalooned the bundle alot

0reactions
ojkellycommented, Nov 26, 2021

Yeah, I’ll still look and see if we’re zipping as efficiently as possible, as we ideally shouldn’t hit memory limits to zip a file.

Glad you could resolve by reducing what goes to the bundler. Same principle as docker here, as we need to copy the repo first, then do stuff. The less we copy the faster it can go. But, as I want this whole tool to be really generalisable, we can’t predict what you wont need, you’ve gotta specify it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Bug?]: "Couldn't allocate enough memory" #3580 - GitHub
Self-service I'd be willing to implement a fix Describe the bug when running yarn install after about 1.5 minutes I get this error....
Read more >
Unable to allocate memory error | After Effects - Adobe Support
Workaround · Try to reduce the amount of memory allocated to other applications: · Purge Memory and Disk Cache: · If Mercury Transmit...
Read more >
Git cannot allocate enough memory to install Homebrew
I am trying to install Homebrew on Linux on a cluster. But I am constantly getting the following error messages:
Read more >
Memory allocation errors can be caused by slow page file ...
Memory allocation failures can occur due to latencies that are associated with growing the size of a page file to support additional memory...
Read more >
How To Fix “bash: fork cannot allocate memory Error”? - Skynats
The insufficient memory issue happens due to several reasons but basically, it occurs due to something is eating up all of your memory...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found