Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing import does not break in compile time but crash in runtime #52175

Closed
GeorgeKnap opened this issue Oct 12, 2023 · 2 comments
Closed

Missing import does not break in compile time but crash in runtime #52175

GeorgeKnap opened this issue Oct 12, 2023 · 2 comments

Comments

@GeorgeKnap
Copy link

GeorgeKnap commented Oct 12, 2023

Which @angular/* package(s) are the source of the bug?

core

Is this a regression?

Yes

Description

When you forget to import standalone directive into standalone component your app breaks in runtime. This should be handled by compiler.

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/stackblitz-starters-v3xxjr?file=src%2Ffoo.directive.ts

Please provide the exception or error you saw

app builds and serves without error but then you get runtime error
Can't bind to 'foo' since it isn't a known property of 'code' (used in the 'App' component template).

This should happen already during build time.

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 16.2.6
Node: 18.18.0
Package Manager: npm 10.1.0
OS: win32 x64

Angular: 16.2.9
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1602.6
@angular-devkit/build-angular   16.2.6
@angular-devkit/core            16.2.6
@angular-devkit/schematics      16.2.6
@angular/cli                    16.2.6
@schematics/angular             16.2.6
rxjs                            7.8.1
typescript                      5.1.6
zone.js                         0.13.3

Anything else?

No response

@GeorgeKnap GeorgeKnap changed the title Missing import does not break in compile time Missing import does not break in compile time but crash in runtime Oct 12, 2023
@JeanMeche
Copy link
Member

JeanMeche commented Oct 12, 2023

Hi this issue has already been raised at #37322 / #46351, let's continue track this issue over there !

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants