I am using ember framework for my frontend application, It wors fine till last week now when I tried to build the application getting below issue,
Build failed.
Build Canceled: Broccoli Builder ran into an error with `UglifyWriter` plugin. 💥
SyntaxError: Unexpected token: name (v)
Error
at new JS_Parse_Error (eval at <anonymous> (/Users/vad/dev/book-frontend/node_modules/broccoli-uglify-sourcemap/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:1545:18)
at js_error (eval at <anonymous> (/Users/vad/dev/book-frontend/node_modules/broccoli-uglify-sourcemap/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:1553:11)
at croak (eval at <anonymous> (/Users/vad/dev/book-frontend/node_modules/broccoli-uglify-sourcemap/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2092:9)
at token_error (eval at <anonymous> (/Users/vad/dev/book-frontend/node_modules/broccoli-uglify-sourcemap/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2100:9)
at unexpected (eval at <anonymous> (/Users/vad/dev/content-frontend/node_modules/broccoli-uglify-sourcemap/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2106:9)
Please find the below package.json for your reference
{
"name": "book-content",
"version": "0.0.0",
"description": "Book management platform",
"private": true,
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"build": "ember build",
"start": "ember server",
"test": "ember test"
},
"repository": "",
"engines": {
"node": ">= 0.10.0"
},
"author": "",
"license": "MIT",
"devDependencies": {
"broccoli-asset-rev": "^2.2.0",
"broccoli-funnel": "^1.0.2",
"broccoli-merge-trees": "^1.1.1",
"bson": "^4.0.4",
"ember-ajax": "0.7.1",
"ember-aupac-typeahead": "3.1.0",
"ember-browserify": "^1.2.2",
"ember-can": "^0.8.1",
"ember-cli": "2.13.0",
"ember-cli-app-version": "^1.0.0",
"ember-cli-autocomplete-input": "1.1.0",
"ember-cli-babel": "^5.1.5",
"ember-cli-dependency-checker": "^1.2.0",
"ember-cli-htmlbars": "^1.0.1",
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
"ember-cli-inject-live-reload": "^1.3.1",
"ember-cli-moment-shim": "^3.7.1",
"ember-cli-pace": "0.1.0",
"ember-cli-pagination": "2.2.2",
"ember-cli-qunit": "^1.2.1",
"ember-cli-release": "0.2.8",
"ember-cli-sass": "^7.1.7",
"ember-cli-sri": "^2.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-composable-helpers": "2.1.0",
"ember-concurrency": "0.8.21",
"ember-data": "2.7.0",
"ember-disable-proxy-controllers": "^1.0.1",
"ember-export-application-global": "^1.0.4",
"ember-get-helper": "1.1.0",
"ember-load-initializers": "^0.5.0",
"ember-lodash": "4.17.1",
"ember-moment": "^7.8.0",
"ember-plupload": "1.13.18",
"ember-power-select-typeahead": "0.7.1",
"ember-query-params-reset": "2.0.0",
"ember-resolver": "^2.0.3",
"ember-rl-month-picker": "^0.2.0",
"ember-rl-year-picker": "^0.2.0",
"ember-slide-push-menu": "1.0.0",
"ember-truth-helpers": "1.2.0",
"ember-uploader": "1.0.0",
"ember-validations": "v2.0.0-alpha.5",
"express": "^4.13.4",
"glob": "^4.5.3",
"loader.js": "^4.0.0",
"morgan": "^1.7.0",
"uglify-js": "2.7.1"
},
"dependencies": {
"minimist": "^1.2.0"
}
}
I see some of the dependencies pulled the latest version of uglify:3.11.3 which could cause an issue but I don't know how to instruct them to use version 2.7.0 or the one which is not causing an issue. I don't know how to override nested dependency.
Could anyone please guide me to fix the issue?