martpie / next-transpile-modules

Next.js plugin to transpile code from node_modules. Please see: https://github.com/martpie/next-transpile-modules/issues/291
MIT License
1.13k stars 85 forks source link

Allocation failed - JavaScript heap out of memory #230

Closed devv-aman closed 1 year ago

devv-aman commented 2 years ago

Are you trying to transpile a local package or an npm package? If an npm package, which one? react-transpile-modules

Describe the bug We're building our next project on AWS ECS with build CPU size of 3GB Things have been running smooth, although since last deploy suddenly getting Out of Memory. We're not expecting this to go out of memory on a 3GB memory CPU

image

This behaviour occured after using react-timezone-select with react-transpile-modules

const withTM = require('next-transpile-modules')(['react-timezone-select']);

We've also tried resolveSymlinks true after reading issuecomment-719449598, but even after that, the build is failing

const withTM = require('next-transpile-modules')(['react-timezone-select'], {
  resolveSymlinks: true
});

Expected behavior The build should not fail

Setup

paales commented 2 years ago

@devv-aman https://github.com/vercel/next.js/issues/30330#issuecomment-952172377

LukasBombach commented 2 years ago

This may be related

https://github.com/changesets/changesets/issues/302#issuecomment-604723083