1

When I am building Nuxt Js app using AWS Build. Getting below error frequently:


[fatal] Nuxt build error

ERROR in app.f235f70.js from Terser

Error: Call retries were exceeded at ChildProcessWorker.initialize (node_modules/jest-worker/build/workers/ChildProcessWorker.js:191:21)

at ChildProcessWorker._onExit (node_modules/jest-worker/build/workers/ChildProcessWorker.js:268:12)

at ChildProcess.emit (events.js:198:13)

at ChildProcess.EventEmitter.emit (domain.js:448:20)

at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)

╭─────────────────────────────╮

│ ✖ Nuxt Fatal Error │

│ Error: Nuxt build error │

╰─────────────────────────────╯

npm ERR! code ELIFECYCLE npm ERR! errno 1


This error I am getting frequently. Means if build fails and I again trigger build pipeline, it build successfully without any external config change or code change.

Want to understand root cause and possible solution or fix any.

Do I need to perform any setting changes in aws build pipeline, or any config change or hardware/instance selection?

Let me know if any specific information required.

urvish
  • 27
  • 2
  • 10
  • I increase Heap memory while build Node project onserver in pipeline , and it fixed issue. like: NODE_OPTIONS=--max-old-space-size=8192 npm start . Ref: https://stackoverflow.com/questions/34356012/how-to-increase-nodejs-default-memory – urvish Apr 12 '21 at 15:33

1 Answers1

1

This issue appears when bundle size has increased and there is not enough memory to build the project.

I faced similar issue and it was resolved by increasing the memory on pod on which jenkins were running.

If you have already enough memory allocated, the you need to try below command which migh help:

node --max_old_space_size=4096 node_modules/@angular/cli/bin/ng build --prod

there is more info in below article: https://tutorialsforangular.com/2020/08/29/fixing-angular-build-memory-issues/#:~:text=You%20should%20try%20and%20set,to%20build%20most%20Angular%20projects.

Nikhil Kamani
  • 850
  • 9
  • 12