René's URL Explorer Experiment


Title: Issue with `fullTemplateTypeCheck` and `ng serve` · Issue #15762 · angular/angular-cli · GitHub

Open Graph Title: Issue with `fullTemplateTypeCheck` and `ng serve` · Issue #15762 · angular/angular-cli

X Title: Issue with `fullTemplateTypeCheck` and `ng serve` · Issue #15762 · angular/angular-cli

Description: 🐞 Bug report Command (mark with an x) - [ ] new - [ ] build - [x] serve - [ ] test - [ ] e2e - [ ] generate - [ ] add - [ ] update - [ ] lint - [ ] xi18n - [ ] run - [ ] config - [ ] help - [ ] version - [ ] doc Is this a regression? I d...

Open Graph Description: 🐞 Bug report Command (mark with an x) - [ ] new - [ ] build - [x] serve - [ ] test - [ ] e2e - [ ] generate - [ ] add - [ ] update - [ ] lint - [ ] xi18n - [ ] run - [ ] config - [ ] help - [ ] ver...

X Description: 🐞 Bug report Command (mark with an x) - [ ] new - [ ] build - [x] serve - [ ] test - [ ] e2e - [ ] generate - [ ] add - [ ] update - [ ] lint - [ ] xi18n - [ ] run - [ ] config - [ ] help - [ ] ver...

Opengraph URL: https://github.com/angular/angular-cli/issues/15762

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Issue with `fullTemplateTypeCheck` and `ng serve`","articleBody":"# 🐞 Bug report\r\n\r\n### Command (mark with an `x`)\r\n```\r\n- [ ] new\r\n- [ ] build\r\n- [x] serve\r\n- [ ] test\r\n- [ ] e2e\r\n- [ ] generate\r\n- [ ] add\r\n- [ ] update\r\n- [ ] lint\r\n- [ ] xi18n\r\n- [ ] run\r\n- [ ] config\r\n- [ ] help\r\n- [ ] version\r\n- [ ] doc\r\n```\r\n\r\n\r\n### Is this a regression?\r\n\r\nI don't know.\r\n\r\n\r\n### Description\r\n\r\nWhen having `fullTemplateTypeCheck` enabled in `tsconfig.json` and running `ng serve` everything runs fine initially. I might, for example, get nice error messages about my template type-check issues (with colors and everything :smiley:):\r\n\r\n```\r\nERROR in src/app/app.component.html:38:66 - error TS2322: Type 'SearchResults | null' is not assignable to type 'SearchResults | undefined'.\r\n  Type 'null' is not assignable to type 'SearchResults | undefined'.\r\n\r\n38 \u003caio-search-results #searchResultsView *ngIf=\"showSearchResults\" [searchResults]=\"searchResults | async\" (resultSelected)=\"hideSearchResults()\">\u003c/aio-search-results>\r\n                                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\n  src/app/app.component.ts:23:16\r\n    23   templateUrl: './app.component.html',\r\n                      ~~~~~~~~~~~~~~~~~~~~~~\r\n    Error occurs in the template of component AppComponent.\r\n```\r\n\r\nThen on re-compiling (e.g. after editing a file and saving), I get the following error:\r\n\r\n```\r\nERROR in ./src/main.ts\r\n    at plugin.done.then ([...]\\angular\\aio\\node_modules\\@ngtools\\webpack\\src\\loader.js:41:31)\r\n    at process._tickCallback (internal/process/next_tick.js:68:7)\r\nERROR in ./src/polyfills.ts\r\nModule build failed (from ./node_modules/@ngtools/webpack/src/index.js):\r\nError: [...]\\angular\\aio\\src\\polyfills.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.\r\n    at AngularCompilerPlugin.getCompiledFile ([...]\\angular\\aio\\node_modules\\@ngtools\\webpack\\src\\angular_compiler_plugin.js:918:23)\r\n    at plugin.done.then ([...]\\angular\\aio\\node_modules\\@ngtools\\webpack\\src\\loader.js:41:31)\r\n    at process._tickCallback (internal/process/next_tick.js:68:7)\r\ni 「wdm」: Failed to compile.\r\n```\r\n\r\nI might then get some error template type-check errors, but not as nicely formatted (or colorful) as before:\r\n\r\n```\r\nERROR in src/app/app.component.html(38,66): error TS2322: Type 'SearchResults | null' is not assignable to type 'SearchResults | undefined'.\r\n      Type 'null' is not assignable to type 'SearchResults | undefined'.\r\n    src/app/app.component.html(47,63): error TS2322: Type 'NavigationNode[]' is not assignable to type 'Option[]'.\r\n      Type 'NavigationNode' is not assignable to type 'Option'.\r\n        Types of property 'title' are incompatible.\r\n          Type 'string | undefined' is not assignable to type 'string'.\r\n            Type 'undefined' is not assignable to type 'string'.\r\n    src/app/app.component.html(47,87): error TS2322: Type 'NavigationNode' is not assignable to type 'Option'.\r\n    src/app/custom-elements/api/api-list.component.html(24,8): error TS2322: Type 'ApiSection[] | null' is not assignable to type 'ApiSection[] | Iterable\u003cApiSection> | undefined'.\r\n...\r\n```\r\n\r\nAfter this first error, the app is not re-compiled when I make changes (I have to stop the process and run `ng serve` anew).\r\n\r\n(NOTE: The error seems only (or much more often) happen when there _are_ template type-check errors.)\r\n\r\n\r\n## 🔬 Minimal Reproduction\r\n\r\nIt started happening for me in PR angular/angular#32980. To reproduce, you could:\r\n\r\n1. Check out the PR.\r\n2. Reset to the commit before ``build(docs-infra): enable `fullTemplateTypeCheck` (and fix failures)`` (currently https://github.com/angular/angular/pull/32980/commits/3f228a626).\r\n3. Add `fullTemplateTypeCheck: true` in `aio/tsconfig.json > angularCompilerOptions`.\r\n4. Run `yarn --cwd=aio && yarn --cwd=aio start`. _(You should see some nice template type-check error messages.)_\r\n5. Open `aio/src/app/app.component.ts`, make a change and save it. _(You should see the error.)_\r\n\r\n(NOTE: If that reproduction isn't helpful, I can try to create a minimal one with a new app.)\r\n\r\n\r\n## 🌍 Your Environment\r\n\r\n(NOTE: I am on 9.0.0-next.8 now, but this happened with 9.0.0-next.6 as well.)\r\n\r\n\u003cpre>\u003ccode>\r\nAngular CLI: 9.0.0-next.8\r\nNode: 10.16.3\r\nOS: win32 x64\r\nAngular: 9.0.0-next.9\r\n... animations, common, compiler, compiler-cli, core, elements\r\n... forms, language-service, platform-browser\r\n... platform-browser-dynamic, router, service-worker\r\n\r\nPackage                           Version\r\n-----------------------------------------------------------\r\n@angular-devkit/architect         0.900.0-next.8\r\n@angular-devkit/build-angular     0.900.0-next.8\r\n@angular-devkit/build-optimizer   0.900.0-next.8\r\n@angular-devkit/build-webpack     0.900.0-next.8\r\n@angular-devkit/core              9.0.0-next.8\r\n@angular-devkit/schematics        9.0.0-next.8\r\n@angular/cdk                      9.0.0-next.0\r\n@angular/cli                      9.0.0-next.8\r\n@angular/material                 9.0.0-next.0\r\n@ngtools/webpack                  9.0.0-next.8\r\n@schematics/angular               9.0.0-next.8\r\n@schematics/update                0.900.0-next.8\r\nrxjs                              6.5.3\r\ntypescript                        3.5.3\r\nwebpack                           4.41.0\r\n\u003c/code>\u003c/pre>\r\n","author":{"url":"https://github.com/gkalpak","@type":"Person","name":"gkalpak"},"datePublished":"2019-10-04T12:30:20Z","url":"https://github.com/angular/angular-cli/issues/15762"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:be03ddd2-3088-5711-7e15-4a5979122c07
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD22E:22DB35:2774F4F:3259D7E:6B0188D5
html-safe-noncec0adca194ef0f3c16a04d253dec7f536ce9c138fdf1615e2e08cd47ed6f88ff5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjJFOjIyREIzNToyNzc0RjRGOjMyNTlEN0U6NkIwMTg4RDUiLCJ2aXNpdG9yX2lkIjoiMzU2MTY2NDYwNDgxMzc1NjYyOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac5dfe53c7fcfd322a462720f30af7e19c38b973f2c996368e8ab0a75639e7b4e1
hovercard-subject-tagissue:502609333
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/15762/issue_layout
twitter:imagehttps://opengraph.githubassets.com/63740197222b2b77b6b73599d3f54beb5cae9b0848fdec61e965ca14d99af5a1/angular/angular-cli/issues/15762
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/63740197222b2b77b6b73599d3f54beb5cae9b0848fdec61e965ca14d99af5a1/angular/angular-cli/issues/15762
og:image:alt🐞 Bug report Command (mark with an x) - [ ] new - [ ] build - [x] serve - [ ] test - [ ] e2e - [ ] generate - [ ] add - [ ] update - [ ] lint - [ ] xi18n - [ ] run - [ ] config - [ ] help - [ ] ver...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamegkalpak
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/angular/angular-cli git https://github.com/angular/angular-cli.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id36891867
octolytics-dimension-repository_nwoangular/angular-cli
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id36891867
octolytics-dimension-repository_network_root_nwoangular/angular-cli
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/angular-cli/issues/15762#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular-cli%2Fissues%2F15762
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular-cli%2Fissues%2F15762
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=angular%2Fangular-cli
Reloadhttps://github.com/angular/angular-cli/issues/15762
Reloadhttps://github.com/angular/angular-cli/issues/15762
Reloadhttps://github.com/angular/angular-cli/issues/15762
angularhttps://github.com/angular
angular-clihttps://github.com/angular/angular-cli
Codehttps://github.com/angular/angular-cli
Issues198 (198)https://github.com/angular/angular-cli/issues
Pull requests23 (23)https://github.com/angular/angular-cli/pulls
Actionshttps://github.com/angular/angular-cli/actions
Security and quality8 (8)https://github.com/angular/angular-cli/security
Insightshttps://github.com/angular/angular-cli/insights
https://github.com/angular/angular-cli
New issuehttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/15762
New issuehttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/15762
Issue with fullTemplateTypeCheck and ng servehttps://github.com/angular/angular-cli/issues/15762#top
area: @ngtools/webpackhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22area%3A%20%40ngtools%2Fwebpack%22
freq3: highhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22freq3%3A%20high%22
severity3: brokenhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22severity3%3A%20broken%22
type: bug/fixhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%2Ffix%22
Backloghttps://github.com/angular/angular-cli/milestone/12
https://github.com/gkalpak
gkalpakhttps://github.com/gkalpak
on Oct 4, 2019https://github.com/angular/angular-cli/issues/15762#issue-502609333
angular/angular#32980https://github.com/angular/angular/pull/32980
angular/angular@3f228a626https://github.com/angular/angular/commit/3f228a626
https://github.com/gkalpak
gkalpakhttps://github.com/gkalpak
on Oct 4, 2019https://github.com/angular/angular-cli/issues/15762#issuecomment-538376777
@filipesilvahttps://github.com/filipesilva
alan-agius4https://github.com/alan-agius4
area: @ngtools/webpackhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22area%3A%20%40ngtools%2Fwebpack%22
freq3: highhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22freq3%3A%20high%22
severity3: brokenhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22severity3%3A%20broken%22
on Oct 4, 2019https://github.com/angular/angular-cli/issues/15762#event-2687730733
ngbothttps://github.com/apps/ngbot
needsTriagehttps://github.com/angular/angular-cli/milestone/11
on Oct 4, 2019https://github.com/angular/angular-cli/issues/15762#event-2687730765
alan-agius4https://github.com/alan-agius4
type: bug/fixhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%2Ffix%22
on Oct 4, 2019https://github.com/angular/angular-cli/issues/15762#event-2687730944
ngbothttps://github.com/apps/ngbot
needsTriagehttps://github.com/angular/angular-cli/milestone/11
Backloghttps://github.com/angular/angular-cli/milestone/12
on Oct 4, 2019https://github.com/angular/angular-cli/issues/15762#event-2687731017
https://github.com/filipesilva
filipesilvahttps://github.com/filipesilva
on Oct 4, 2019https://github.com/angular/angular-cli/issues/15762#issuecomment-538456658
angular/angular#32213https://github.com/angular/angular/issues/32213
angular/angular#32214https://github.com/angular/angular/issues/32214
the docshttps://angular.io/guide/aot-compiler#phase-3-template-type-checking
filipesilvahttps://github.com/filipesilva
completedhttps://github.com/angular/angular-cli/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Oct 4, 2019https://github.com/angular/angular-cli/issues/15762#event-2687897331
https://github.com/apps/angular-automatic-lock-bot
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Nov 4, 2019https://github.com/angular/angular-cli/issues/15762#issuecomment-549252711
automatic conversation locking policyhttps://github.com/angular/angular/blob/67d80f/docs/GITHUB_PROCESS.md#conversation-locking
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Nov 4, 2019https://github.com/angular/angular-cli/issues/15762#event-2766797348
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular-cli/issues/15762
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/15762
area: @ngtools/webpackhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22area%3A%20%40ngtools%2Fwebpack%22
freq3: highhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22freq3%3A%20high%22
severity3: brokenhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22severity3%3A%20broken%22
type: bug/fixhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%2Ffix%22
BacklogNo due datehttps://github.com/angular/angular-cli/milestone/12
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.