Skip to content

ng build -prod don't work - Unexpected token: name (...) #1663

@zim32

Description

@zim32

When I exec ng build everything works fine, but -prod flagis not working.

  1. OS? Linux aa83b5e80947 3.16.0-51-generic feat(test): karma integration and unit test sample #69~14.04.1-Ubuntu SMP Wed Oct 7 15:32:41 UTC 2015 x86_64 GNU/Linux
  2. angular-cli: 1.0.0-beta.10
    node: 4.4.7
    os: linux x64
  3. App created with ng

Build failed.
The Broccoli Plugin: [BundlePlugin] failed with:
Error: SyntaxError: Unexpected token: name (NoteItemComponent) (line: 31533, col: 6, pos: 1238606)

Error
at new JS_Parse_Error (eval at (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/uglify-js/tools/node.js:28:1), :1545:18)
at js_error (eval at (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/uglify-js/tools/node.js:28:1), :1553:11)
at croak (eval at (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/uglify-js/tools/node.js:28:1), :2089:9)
at token_error (eval at (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/uglify-js/tools/node.js:28:1), :2097:9)
at unexpected (eval at (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/uglify-js/tools/node.js:28:1), :2103:9)
at semicolon (eval at (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/uglify-js/tools/node.js:28:1), :2123:56)
at simple_statement (eval at (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/uglify-js/tools/node.js:28:1), :2314:73)
at eval (eval at (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/uglify-js/tools/node.js:28:1), :2183:19)
at eval (eval at (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/uglify-js/tools/node.js:28:1), :2136:24)
at block_ (eval at (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/uglify-js/tools/node.js:28:1), :2429:20)
at eval (eval at (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/uglify-js/tools/node.js:28:1), :2401:25)
at function_ (eval at (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/uglify-js/tools/node.js:28:1), :2407:15)
at expr_atom (eval at (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/uglify-js/tools/node.js:28:1), :2622:24)
at maybe_unary (eval at (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/uglify-js/tools/node.js:28:1), :2792:19)
at expr_ops (eval at (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/uglify-js/tools/node.js:28:1), :2827:24)
at maybe_conditional (eval at (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/uglify-js/tools/node.js:28:1), :2832:20)
at maybe_assign (eval at (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/uglify-js/tools/node.js:28:1), :2856:20)
at expression (eval at (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/uglify-js/tools/node.js:28:1), :2875:20)
at expr_list (eval at (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/uglify-js/tools/node.js:28:1), :2641:24)
at minify (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/systemjs-builder/lib/output.js:79:11)
at exports.writeOutputs (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/systemjs-builder/lib/output.js:153:14)
at /home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/systemjs-builder/lib/builder.js:627:14
at tryCatcher (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/systemjs-builder/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/systemjs-builder/node_modules/bluebird/js/release/promise.js:504:31)
at Promise._settlePromise (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/systemjs-builder/node_modules/bluebird/js/release/promise.js:561:18)
at Promise._settlePromise0 (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/systemjs-builder/node_modules/bluebird/js/release/promise.js:606:10)
at Promise._settlePromises (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/systemjs-builder/node_modules/bluebird/js/release/promise.js:685:18)
at Async._drainQueue (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/systemjs-builder/node_modules/bluebird/js/release/async.js:138:16)
at Async._drainQueues (/home/zim32/www/app/givezp/node_modules/angular-cli/node_modules/systemjs-builder/node_modules/bluebird/js/release/async.js:148:10)
at Immediate.Async.drainQueues as _onImmediate
at processImmediate as _immediateCallback

NoteItemComponent is just Angular component.
Due to awful error message I don't know what to include else here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions