[Build Error] Out of memory when pages exceed 95
See original GitHub issueDescription
Everything works fine when pages are 95, but after adding one more simple page and run build
I got this error.
I searched and tried this node --max_old_space_size=12000 ./node_modules/.bin/gatsby build
. There is no error but the build time is very long (from 100s to around 600s with 1 more page) and still fail in Circle CI, so I don’t think that is a solution. I totally stuck and need help.
Steps to reproduce
Clone this project. https://github.com/siriwatknp/mui-treasury
// at master branch
yarn install
yarn build
Expected result
It should be able to build. If delete some page in /website/src/pages/styles/...
and then run yarn build
it will pass. 😱
Actual result
Build fail with the error above.
Environment
System: OS: macOS 10.15.1 CPU: (12) x64 Intel® Core™ i7-8750H CPU @ 2.20GHz Shell: 5.7.1 - /bin/zsh Binaries: Node: 10.16.3 - ~/.nvm/versions/node/v10.16.3/bin/node Yarn: 1.21.1 - /usr/local/bin/yarn npm: 6.9.0 - ~/.nvm/versions/node/v10.16.3/bin/npm Languages: Python: 2.7.16 - /usr/bin/python Browsers: Chrome: 80.0.3987.149 Firefox: 73.0.1 Safari: 13.0.3
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (9 by maintainers)
I will close this issue for now.
@siriwatknp eh, tbh, I actually don’t know the perf implications of that choice. All I see is
createPage
api, though. I’m not sure if that should affect the JS bundle, or why it would, but maybe.I’ve seen issues like this before and it’s usually a configuration issue of some kind. Perhaps @wardpeet has a better insight.