René's URL Explorer Experiment


Title: `ng generate application` produces a missing stylesheet when a workspace component type is configured · Issue #34684 · angular/angular-cli · GitHub

Open Graph Title: `ng generate application` produces a missing stylesheet when a workspace component type is configured · Issue #34684 · angular/angular-cli

X Title: `ng generate application` produces a missing stylesheet when a workspace component type is configured · Issue #34684 · angular/angular-cli

Description: Hi Angular team! I found a case where a newly generated application fails to build when the workspace has a default component type configured. Command generate, build Description With "@schematics/angular:component": { "type": "component...

Open Graph Description: Hi Angular team! I found a case where a newly generated application fails to build when the workspace has a default component type configured. Command generate, build Description With "@schematics/...

X Description: Hi Angular team! I found a case where a newly generated application fails to build when the workspace has a default component type configured. Command generate, build Description With "@schema...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`ng generate application` produces a missing stylesheet when a workspace component type is configured","articleBody":"Hi Angular team! \n\nI found a case where a newly generated application fails to build when the workspace has a default component `type` configured.\n\n### Command\n\ngenerate, build\n\n### Description\n\nWith `\"@schematics/angular:component\": { \"type\": \"component\" }` in the workspace-level `schematics` section of `angular.json`, generating an application with the 2025 file naming style produces `app.component.css`, but the generated `app.ts` references `./app.css`.\n\nAs a result, the application fails its first build with NG2008. Both `app.ts` and an extra `app.component.ts` are generated.\n\n### Minimal Reproduction\n\n1. Create a workspace:\n\n   ```sh\n   ng new component-type-repro --create-application=false --defaults --package-manager=npm --skip-git\n   cd component-type-repro\n   ```\n\n2. Add the following at the **top level** of `angular.json` (alongside `projects`):\n\n   ```json\n   \"schematics\": {\n     \"@schematics/angular:component\": {\n       \"type\": \"component\"\n     }\n   }\n   ```\n\n3. Generate and build an application:\n\n   ```sh\n   ng generate application demo --file-name-style-guide=2025 --style=css --ssr=false --skip-install\n   ng build demo --configuration=development\n   ```\n\n**Actual behavior**\n\nThe generated files include:\n\n```text\nprojects/demo/src/app/app.ts\nprojects/demo/src/app/app.component.ts\nprojects/demo/src/app/app.component.css\n```\n\nThere is no `app.css`, but `app.ts` contains:\n\n```ts\nstyleUrl: './app.css',\n```\n\n**Expected behavior**\n\nThe root component files and their references should consistently follow the selected application naming style: `app.ts`, `app.html`, and `app.css` for 2025. The generated application should build successfully.\n\nThe workspace component default should still apply when generating ordinary components separately.\n\n### Exception or Error\n\n```text\n✘ [ERROR] NG2008: Could not find stylesheet file './app.css'. [plugin angular-compiler]\n\n    projects/demo/src/app/app.ts:7:12:\n      7 │   styleUrl: './app.css',\n        ╵             ~~~~~~~~~~~\n```\n\n### Your Environment\n\nReproduced with the locally built CLI from `main` at d5035923f0e357b2526c98110125eee04b05192f, using the repository's Bazel E2E runner. Its `ng version` output reports:\n\n```text\nAngular CLI       : 22.3.0-next.5\nAngular           : 22.3.0-next.4\nNode.js           : 24.15.0\nPackage Manager   : npm 12.0.2\nOperating System  : darwin x64\n```\n\nI have not established the last working version.\n\n### Anything else relevant?\n\n- #31053 introduced the file naming style option and describes the 2025 root component filename as `app.ts`.\n- #34450 and #34472 addressed similar inheritance of the workspace component `type` in the app-shell and routed-module schematics. This report concerns the application schematic.\n\nThe application schematic explicitly sets the component `type` for the 2016 style, but leaves it unspecified for 2025. It appears that the workspace default is inherited during component generation while the application templates continue to use the 2025 filenames.\n\nI have a local fix and an E2E regression test for this case and will follow up with a PR. Thanks for taking a look!\n\n","author":{"url":"https://github.com/nagahara-naoki","@type":"Person","name":"nagahara-naoki"},"datePublished":"2026-11-11T11:58:52Z","url":"https://github.com/angular/angular-cli/issues/34684"}

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:56480aa0-b108-d0ac-e90a-8ca8b5d6c47c
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id97FE:29FFA9:356FC47:43AF9C2:6B01DE67
html-safe-nonce21d684aedd7146952cb14795f45eb52e5ba0b7b6b79d393a27d483209a328ae2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5N0ZFOjI5RkZBOTozNTZGQzQ3OjQzQUY5QzI6NkIwMURFNjciLCJ2aXNpdG9yX2lkIjoiOTA5NDgxNDQ5MzQzMDYzNjEzNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac144272c9c147f7ab8a5b419501153ff35a4885623696f8dada931a7013d739f4
hovercard-subject-tagissue:6327941538
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/34684/issue_layout
twitter:imagehttps://opengraph.githubassets.com/59f07ae4389ad36f727626d0226a625cf49a8e16040e4eeb9b968385053edb0c/angular/angular-cli/issues/34684
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/59f07ae4389ad36f727626d0226a625cf49a8e16040e4eeb9b968385053edb0c/angular/angular-cli/issues/34684
og:image:altHi Angular team! I found a case where a newly generated application fails to build when the workspace has a default component type configured. Command generate, build Description With "@schematics/...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamenagahara-naoki
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/34684#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular-cli%2Fissues%2F34684
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%2F34684
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/34684
Reloadhttps://github.com/angular/angular-cli/issues/34684
Reloadhttps://github.com/angular/angular-cli/issues/34684
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/34684
New issuehttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/34684
#34685https://github.com/angular/angular-cli/pull/34685
ng generate application produces a missing stylesheet when a workspace component type is configuredhttps://github.com/angular/angular-cli/issues/34684#top
#34685https://github.com/angular/angular-cli/pull/34685
area: @schematics/angularhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22area%3A%20%40schematics%2Fangular%22
needsTriagehttps://github.com/angular/angular-cli/milestone/11
https://github.com/nagahara-naoki
nagahara-naokihttps://github.com/nagahara-naoki
on Nov 11, 2026https://github.com/angular/angular-cli/issues/34684#issue-6327941538
d503592https://github.com/angular/angular-cli/commit/d5035923f0e357b2526c98110125eee04b05192f
feat(@schematics/angular): support different file name style guides in ng new #31053https://github.com/angular/angular-cli/pull/31053
fix(@schematics/angular): set explicit type for the app-shell component #34450https://github.com/angular/angular-cli/pull/34450
fix(@schematics/angular): set explicit type for the module --route component #34472https://github.com/angular/angular-cli/pull/34472
angular-robothttps://github.com/apps/angular-robot
area: @schematics/angularhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22area%3A%20%40schematics%2Fangular%22
on Nov 11, 2026https://github.com/angular/angular-cli/issues/34684#event-35794250725
angular-robothttps://github.com/apps/angular-robot
needsTriagehttps://github.com/angular/angular-cli/milestone/11
on Nov 11, 2026https://github.com/angular/angular-cli/issues/34684#event-35794253136
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular-cli/issues/34684
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/34684
area: @schematics/angularhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22area%3A%20%40schematics%2Fangular%22
needsTriageNo due datehttps://github.com/angular/angular-cli/milestone/11
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.