angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Error during prod build in Angular Cli

Open cv-gh opened this issue 9 years ago • 22 comments

Bug Report or Feature Request (mark with an x)

- [X ] bug report -> please search issues before submitting
- [ ] feature request

Versions.

Repro steps.

The log given by the failure.

94% asset optimization(node:11160) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): SyntaxError: Unexpected token: operator (>) (node:11160) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Desired functionality.

Mention any other details that might be useful.

I can do normal build only build in prod fails with above error. greatly appreciate help here. While I have read the Promise Then and Catch - I have followed the pattern in my source code every where but exact issue is missing and I cant really build anymore.

cv-gh avatar Sep 17 '17 16:09 cv-gh

I have similar issue when running ./ng build --prod for ng version 1.5.2

94% asset optimization(node:26226) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): SyntaxError: Unexpected token: name (Commented)

I've tracked the problem to the include of a particular script via the .angular-cli.json, I have this :

        "scripts": [
            "../libs/autobahn-js-built-17.5.2/autobahn.js"
        ],

... and further, I suspect the error happens during the minification stage (when uglifyjs would be invoked).

I can't seem to find any way to get further logging / diagnostics from ng , (I tried --verbose but just gives mainly timing stats, rather information on what sub programs are being invoked etc ... perhap ng needs option for more detailed output?) ... will continue digging, suspicion is incompatibility between uglifyjs and the external javascript.

darrenjs avatar Dec 17 '17 00:12 darrenjs

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.