I am having the same issue when building (‘ionic serve’ works fine).
But my tsconfig target is ES5.
It seems to be an issue with an external package linq-es2015. But I have no control over it.
[12:32:13] sass started …
[12:32:17] uglifyjs failed: SyntaxError: Unexpected token: name (EnumerableImpl)
[12:32:17] ionic-app-script task: “build”
[12:32:17] Error: SyntaxError: Unexpected token: name (EnumerableImpl)
I have updated ionic, @ionic/app-scripts. Tried using --dev. Tried using custom uglifyjs.config.js and setting the mangle and compress to false.
Nothing worked.
My Ionic Info
Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.3
Ionic CLI Version: 2.1.13
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.46
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v7.1.0
Xcode version: Not installed
I resolved my issue.
Partially my own ignorance of that library. I though it had TS classes that would be transpiled to ES5. But as the name suggested (linq-es2015), it was ES6 only. Which uglifyjs fails on processing.
For anyone with this issue using this library, just change to linq-es5 package.
I am new to Ionic2. I am facing the same issue. I am not able to resolve this. Can you please explain me briefly along with some details it will help me a lot.