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.

Ivy doesn't report about missed component declaration

See original GitHub issue

🐞 bug report

Affected Package

compiler

Is this a regression?

yes.

Without Ivy If you miss component declaration you get an error. Either during AOT build or serve ERROR in : Cannot determine the module for class ButtonComponent in ...

or with JIT in browser (ng serve)

compiler.js:2175 Uncaught Error: Template parse errors:
'app-button' is not a known element:

With Ivy Nothing reported in both modes! Nieither during the build, nor in the browser console.

Description

I belive it should be reporting about missed component declaration in all modes. Error message must include missed tag name.

🔬 Minimal Reproduction

here’s the repo to illistrate the problem https://github.com/fetis/ng8ivy

I created ButtonComponent and comment it in module declaration.

🌍 Your Environment

Angular Version: Angular CLI: 8.0.3 Node: 12.4.0 OS: darwin x64 Angular: 8.0.1 … animations, common, compiler, compiler-cli, core, forms … language-service, platform-browser, platform-browser-dynamic … router

Package Version

@angular-devkit/architect 0.800.3 @angular-devkit/build-angular 0.800.3 @angular-devkit/build-optimizer 0.800.3 @angular-devkit/build-webpack 0.800.3 @angular-devkit/core 8.0.3 @angular-devkit/schematics 8.0.3 @angular/cli 8.0.3 @ngtools/webpack 8.0.3 @schematics/angular 8.0.3 @schematics/update 0.800.3 rxjs 6.4.0 typescript 3.4.5 webpack 4.30.0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
alxhubcommented, Jan 23, 2020

Closing as we now have proper template type-checking including the error message that tells you your component should be part of an NgModule.

1reaction
karacommented, Oct 3, 2019

hm, I hear different info from different ng-devs. Last time @matsko on local meetup said that the current status is kind of RC and all internal testing is complete.

Ivy isn’t RC yet (will be RC when v9 RC comes out). Internal testing is definitely still in-progress. We don’t have all the pieces done yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

MatToolbar throws error when using it with Angular 9
I'm opting of restarting the server everytime i'm adding a material component into AppModule. But if i'm wrong, please let me know.
Read more >
Type-checking templates in Angular View Engine and Ivy
In this article we'll explore how Angular type-checks templates, review the difference between View Engine and Ivy type-checking and break down the process ......
Read more >
Angular 9's Best Hidden Feature: Strict Template Checking
Find and report more errors than ever with Angular 9's Ivy compiler, strict template checking.
Read more >
Understanding variant selection - Gradle User Manual
For external components, variants are defined by published Gradle Module Metadata or are derived from Ivy/Maven metadata.
Read more >
Emulating standalone components using single component ...
Tagged with angular, ivy, components. ... The SCAM for a routed component doesn't export its component. It also doesn't configure routes.
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