Ember Build Production UglifyWriter is blowing up

ERROR Summary:

  • broccoliBuilderErrorStack: Error: Unexpected token: eof (undefined) at objectToError (/Users/johnking/ws/benefits-management/benefits-management-ui/node_modules/workerpool/lib/WorkerHandler.js:63:14) at ChildProcess. (/Users/johnking/ws/benefits-management/benefits-management-ui/node_modules/workerpool/lib/WorkerHandler.js:146:32) at ChildProcess.emit (events.js:196:13) at emit (internal/child_process.js:849:12) at processTicksAndRejections (internal/process/task_queues.js:83:17)
  • code: [undefined]
  • codeFrame: Unexpected token: eof (undefined)
  • errorMessage: Unexpected token: eof (undefined) at UglifyWriter -~- created here: -~- at UglifyWriter.Plugin (/Users/johnking/ws/benefits-management/benefits-management-ui/node_modules/broccoli-plugin/index.js:7:31) at new UglifyWriter (/Users/johnking/ws/benefits-management/benefits-management-ui/node_modules/broccoli-uglify-sourcemap/index.js:38:10) at UglifyWriter (/Users/johnking/ws/benefits-management/benefits-management-ui/node_modules/broccoli-uglify-sourcemap/index.js:33:12) at Class.postprocessTree (/Users/johnking/ws/benefits-management/benefits-management-ui/node_modules/ember-cli-uglify/index.js:54:50) at /Users/johnking/ws/benefits-management/benefits-management-ui/node_modules/ember-cli/lib/utilities/addon-process-tree.js:6:25 at Array.reduce () at addonProcessTree (/Users/johnking/ws/benefits-management/benefits-management-ui/node_modules/ember-cli/lib/utilities/addon-process-tree.js:4:32) at EmberApp.addonPostprocessTree (/Users/johnking/ws/benefits-management/benefits-management-ui/node_modules/ember-cli/lib/broccoli/ember-app.js:866:12) at EmberApp.host.addonPostprocessTree (/Users/johnking/ws/benefits-management/benefits-management-ui/node_modules/ember-auto-import/js/auto-import.js:103:20) at EmberApp.toTree (/Users/johnking/ws/benefits-management/benefits-management-ui/node_modules/ember-cli/lib/broccoli/ember-app.js:1825:17) -~- (end) -~-
  • errorType: Build Error
  • location:
    • column: [undefined]
    • file: [undefined]
    • line: 257652
    • treeDir: [undefined]
  • message: Unexpected token: eof (undefined) at UglifyWriter -~- created here: -~- at UglifyWriter.Plugin (/Users/johnking/ws/benefits-management/benefits-management-ui/node_modules/broccoli-plugin/index.js:7:31) at new UglifyWriter (/Users/johnking/ws/benefits-management/benefits-management-ui/node_modules/broccoli-uglify-sourcemap/index.js:38:10) at UglifyWriter (/Users/johnking/ws/benefits-management/benefits-management-ui/node_modules/broccoli-uglify-sourcemap/index.js:33:12) at Class.postprocessTree (/Users/johnking/ws/benefits-management/benefits-management-ui/node_modules/ember-cli-uglify/index.js:54:50) at /Users/johnking/ws/benefits-management/benefits-management-ui/node_modules/ember-cli/lib/utilities/addon-process-tree.js:6:25 at Array.reduce () at addonProcessTree (/Users/johnking/ws/benefits-management/benefits-management-ui/node_modules/ember-cli/lib/utilities/addon-process-tree.js:4:32) at EmberApp.addonPostprocessTree (/Users/johnking/ws/benefits-management/benefits-management-ui/node_modules/ember-cli/lib/broccoli/ember-app.js:866:12) at EmberApp.host.addonPostprocessTree (/Users/johnking/ws/benefits-management/benefits-management-ui/node_modules/ember-auto-import/js/auto-import.js:103:20) at EmberApp.toTree (/Users/johnking/ws/benefits-management/benefits-management-ui/node_modules/ember-cli/lib/broccoli/ember-app.js:1825:17) -~- (end) -~-
  • name: Error
  • nodeAnnotation: [undefined]
  • nodeName: UglifyWriter
  • originalErrorMessage: Unexpected token: eof (undefined)
  • stack: Error: Unexpected token: eof (undefined) at objectToError (/Users/johnking/ws/benefits-management/benefits-management-ui/node_modules/workerpool/lib/WorkerHandler.js:63:14) at ChildProcess. (/Users/johnking/ws/benefits-management/benefits-management-ui/node_modules/workerpool/lib/WorkerHandler.js:146:32) at ChildProcess.emit (events.js:196:13) at emit (internal/child_process.js:849:12) at processTicksAndRejections (internal/process/task_queues.js:83:17)

=================================================================================

It was related to an addon. When I removed ember-fullcalendar, it build successfully

I had a similar issue with the Uglifier. What helped for me was removing ember-cli-Uglifier and replace it with with ember-cli-terser

Try clear your node modules and run ‘npm install’ again it might help.

This ended up being related to ember-bootstrap version. I had to upgrade to version 4. It’s odd that it just started all of the sudden. Finding these dependency issues can be really tedious when they pop up