#FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

13 messages · Page 1 of 1 (latest)

terse rain
#

After updating to beta.30 all of the sudden I am getting above error when building static.
If I allow more memory with export NODE_OPTIONS="--max-old-space-size=8192" it's fine, but that doesn't seem right thing to do

mossy stump
#

AFAIU It has to do with the way that rollup does tree-shaking, it has to keep everything in memory.

terse rain
#

it's just weird that nothing really changed on my project except storybook version.

mossy stump
#

What version are you coming from?

terse rain
#

beta.12

mossy stump
#

You might have been just under the limit before, maybe. I'm not sure.

terse rain
#

could be, not saying no

#

I think we had issues with storybook mdx files in beta.12 so it wasn't really building it fully and eventually now it all works and might be hitting it

mossy stump
#

ah, that could be, yeah. I'd suggest reading through that issue, there are some other workarounds that you could try that might help, but it mostly involves disabling sourcemaps or other things like that.

terse rain
#

yeah I am trying one now and it seems like build: { rollupOptions: { cache: false } }

#

works

#

Thanks for the hint