question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error during prod build in Angular Cli

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:11
  • Comments:22 (1 by maintainers)

github_iconTop GitHub Comments

21reactions
thekhoicommented, Sep 19, 2017

I got this error when I included a script file inside the angular-cli.json written in es6. I converted it to es5 by change ‘let’ back to ‘var’ and removing arrow functions.

6reactions
DmytroPotapovcommented, Oct 9, 2017

@thekhoi

I got this error when I included a script file inside the angular-cli.json written in es6. I converted it to es5 by change ‘let’ back to ‘var’ and removing arrow functions.

Thanks, it restore production build for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Identify and Fix Build and Deployment Errors in Your Angular ...
In this guide, you will learn how to spot some of the most common build and deployment errors and how to resolve them...
Read more >
ng build --prod => Error: Unknown argument: prod
The reason for this error is the command –prod is deprecated since Angular 12 and removed in Angular 14 based on this Angular-Deprecated ......
Read more >
Error in ng build --prod that doesn't happen with ng serve --prod
But the problem is that the error should both happen with ng serve and ng build. Why ? Multiple reasons: Developers use ng...
Read more >
Deployment - Angular
When you are ready to deploy your Angular application to a remote server, you have various options for deployment. Simple deployment optionslink.
Read more >
Toolips ng build –prod error - MDBootstrap
Would you mind give me some suggestion on this? Thanks. my environment is: Angular CLI: 1.5.5. Node: 6.11.3. OS: win32 x64. Angular: 5.0 ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found