Error: Couldn't allocate enough memory
See original GitHub issueDescribe 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
- 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:
- Created 2 years ago
- Comments:5 (2 by maintainers)

Top Related StackOverflow Question
It seemed that my directory contained some docker volume like tmp
and so on, this boalooned the bundle alot
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.