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.

ng deploy shows success message even if app building fails

See original GitHub issue

Even if there’s a problem in my code and the Angular Compiler detects the issue, the deploy builder assumes that all of the commands have run successfully:

📦 Building "rss-reader". Configuration: "production". Your base-href: "/rss-reader/"

chunk {0} runtime-es2015.b2aca5be9e7b8cc1a1b4.js (runtime) 1.41 kB [entry] [rendered]
chunk {1} main-es2015.e979d12557647e8d62fa.js (main) 128 bytes [initial] [rendered]
chunk {2} polyfills-es2015.270671f3654e232e0bbe.js (polyfills) 130 bytes [initial] [rendered]
chunk {3} styles.7d2e006da3faa06dd951.css (styles) 249 kB [initial] [rendered]

ERROR in app/components/release-notes/release-notes.component.ts:54:5 - error TS2322: Type 'Release' is not assignable to type 'string'.

54     return this.releaseNotes.releases[version];
chunk {scripts} scripts.df42bf43cef21311bf2d.js (scripts) 20.5 kB [entry] [rendered]
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Date: 2019-09-03T14:02:29.664Z - Hash: ac8c61e38fe1b05d4fdf - Time: 15741ms
app/app.component.ts:122:7 - error TS2345: Argument of type '{ id: string; title: string; icon: string; showAsAction: false; onClickListener: () => any; }' is not assignable to parameter of type 'ActionItem'.
  Object literal may only specify known properties, and 'id' does not exist in type 'ActionItem'.

122       id: 'keyboard-shortcuts-action-item',
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
app/app.component.ts:126:43 - error TS2551: Property 'openHotkeyHelpDialog' does not exist on type 'HotkeysService'. Did you mean 'hotkeyHelpDialogId'?

126       onClickListener: () => this.hotkeys.openHotkeyHelpDialog()
                                              ~~~~~~~~~~~~~~~~~~~~

  app/hotkeys/hotkeys.service.ts:36:12
    36   readonly hotkeyHelpDialogId = 'hotkey-help-dialog';
                  ~~~~~~~~~~~~~~~~~~
    'hotkeyHelpDialogId' is declared here.

index.html could not be copied to 404.html. This does not look like an angular-cli project?!
(Hint: are you sure that you have setup the directory correctly?)
🚀 Successfully published via angular-cli-ghpages! Have a nice day!

Ideally, the deploy builder should show that there’s something wrong with the code above and stop the deploying process and/or not show the message that the site was successfully published.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
JohannesHoppecommented, Sep 13, 2019

Okay, this should be an error. I will have to research on that…

1reaction
JohannesHoppecommented, Dec 21, 2019

So the flow looks following: build success => deploy starts => asks for credentials for 2 times => shows success message however nothing is deployed.

I would be amazing to see if smth goes wrong in deployment process.

This was fixed in https://github.com/angular-schule/angular-cli-ghpages/commit/6a8a3c217375b423a5654c388299bf3a12f9e375 (use callback to retrieve error message of gh-pages)

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 >
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 >
Angular: Cannot Get / - Stack Overflow
Run ng build in your command line/terminal, and it should display a useful error, such as the example in red here: Property 'name'...
Read more >
Top 18 Most Common AngularJS Developer Mistakes - Toptal
Common Mistake #14: Misunderstanding The Digest. This AngularJS error was already partly covered in mistakes 9. b and in 13.
Read more >
Global Error Handling in Angular - Philipp Kief
Even if an application has been thoroughly tested before deployment, ... The third button shows a successful request, where no error message is...
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