René's URL Explorer Experiment


Title: Error: moduleId should be a string · Issue #3576 · angular/angular-cli · GitHub

Open Graph Title: Error: moduleId should be a string · Issue #3576 · angular/angular-cli

X Title: Error: moduleId should be a string · Issue #3576 · angular/angular-cli

Description: OS macOS Sierra (10.12.2) Versions angular-cli: 1.0.0-beta.22-1 node: 6.3.1 os: darwin x64 Repro steps ng init # Original project where I encountered the bug ng serve or ng new someApp # Test to check if related to the project ng serve W...

Open Graph Description: OS macOS Sierra (10.12.2) Versions angular-cli: 1.0.0-beta.22-1 node: 6.3.1 os: darwin x64 Repro steps ng init # Original project where I encountered the bug ng serve or ng new someApp # Test to ch...

X Description: OS macOS Sierra (10.12.2) Versions angular-cli: 1.0.0-beta.22-1 node: 6.3.1 os: darwin x64 Repro steps ng init # Original project where I encountered the bug ng serve or ng new someApp # Test to ch...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Error: moduleId should be a string","articleBody":"### OS\r\n> macOS Sierra (10.12.2)\r\n\r\n\r\n### Versions\r\n\r\n> angular-cli: 1.0.0-beta.22-1  \r\n> node: 6.3.1  \r\n> os: darwin x64\r\n\r\n### Repro steps\r\n\r\n```bash\r\nng init # Original project where I encountered the bug\r\nng serve\r\n```\r\n\r\nor \r\n\r\n```bash\r\nng new someApp # Test to check if related to the project\r\nng serve\r\n```\r\n\r\nWith this modification in `src/app/app.component.ts`: \r\n\r\n```diff\r\n@Component({\r\n+  moduleId: module.id,\r\n  selector: 'app-root',\r\n  templateUrl: './app.component.html',\r\n  styleUrls: ['./app.component.css']\r\n})\r\n```\r\n\r\n### The log given by the failure\r\n\r\n```log\r\nError: moduleId should be a string in \"AppComponent\". See https://goo.gl/wIDDiL for more information.\r\nIf you're using Webpack you should inline the template and the styles, see https://goo.gl/X2J8zc.\r\ncomponentModuleUrl — metadata_resolver.js:847\r\ngetNonNormalizedDirectiveMetadata — metadata_resolver.js:198\r\n_loadDirectiveMetadata — metadata_resolver.js:134\r\nmap\r\nloadNgModuleMetadata — metadata_resolver.js:315\r\n_loadModules — runtime_compiler.js:99\r\n_compileModuleAndComponents — runtime_compiler.js:69\r\ncompileModuleAsync — runtime_compiler.js:59\r\n_bootstrapModuleWithZone — application_ref.js:302\r\n(fonction anonyme) — main.ts:12\r\n__webpack_require__ — bootstrap e91d12277f564bbde63b:52\r\n(fonction anonyme) — app.component.html:1\r\n__webpack_require__ — bootstrap e91d12277f564bbde63b:52\r\nwebpackJsonpCallback — bootstrap e91d12277f564bbde63b:23\r\nCode général — main.bundle.js:1\r\n```\r\n\r\n### Useful details\r\n\r\nI was trying to use angular-cli on an existing Angular2 project, to use the built-in server instead of `lite-server` (which I used before, as it's the method shown in the docs), and after some adjustments, I ended up with this error in the browser (Safari) while the Terminal said everything looked fine.\r\n\r\nSo I tried setting up a new Angular 2 project using `ng new` to compare my code and see what went wrong, but when I tried running the sample project I got the same result.\r\n\r\nHere are the logs I get while running the sample project with `ng serve`:\r\n\r\n```log\r\nHash: e91d12277f564bbde63b          / Time: 7492ms                \r\nchunk    {0} main.bundle.js, main.bundle.map (main) 4.75 kB {2} [initial] [rendered]\r\nchunk    {1} styles.bundle.js, styles.bundle.map (styles) 9.99 kB {3} [initial] [rendered]\r\nchunk    {2} vendor.bundle.js, vendor.bundle.map (vendor) 2.22 MB [initial] [rendered]\r\nchunk    {3} inline.bundle.js, inline.bundle.map (inline) 0 bytes [entry] [rendered]\r\nwebpack: bundle is now VALID.\r\n```\r\n\r\nAny idea what could have been done wrong?","author":{"url":"https://github.com/viki53","@type":"Person","name":"viki53"},"datePublished":"2016-12-15T15:51:44Z","url":"https://github.com/angular/angular-cli/issues/3576"}

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:884f6e7c-d9ab-6a53-9ec7-0cd9440b8fcd
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8E04:2AF0D8:115E60B:15BE2F9:6B0241BC
html-safe-nonce15a75bd147fff9fae096384f161672e59324641da1d220930d1645a80941ef6b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTA0OjJBRjBEODoxMTVFNjBCOjE1QkUyRjk6NkIwMjQxQkMiLCJ2aXNpdG9yX2lkIjoiMzc2OTI1NDAxOTM0MDU4MzM1NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacfb6cb8a219cd7bf16edf2933ce5649f1d8790a0b831b6f6c7b791ef08e0749e9
hovercard-subject-tagissue:195840711
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/3576/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d6683e5cef1c45457a2dd8cf6edd17a537f4b61564b6fb250308ec9d60fff2d4/angular/angular-cli/issues/3576
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d6683e5cef1c45457a2dd8cf6edd17a537f4b61564b6fb250308ec9d60fff2d4/angular/angular-cli/issues/3576
og:image:altOS macOS Sierra (10.12.2) Versions angular-cli: 1.0.0-beta.22-1 node: 6.3.1 os: darwin x64 Repro steps ng init # Original project where I encountered the bug ng serve or ng new someApp # Test to ch...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameviki53
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
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
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/angular-cli/issues/3576#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular-cli%2Fissues%2F3576
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%2F3576
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/3576
Reloadhttps://github.com/angular/angular-cli/issues/3576
Reloadhttps://github.com/angular/angular-cli/issues/3576
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/3576
New issuehttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/3576
#3664https://github.com/angular/angular-cli/pull/3664
Error: moduleId should be a stringhttps://github.com/angular/angular-cli/issues/3576#top
#3664https://github.com/angular/angular-cli/pull/3664
https://github.com/Brocco
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgenthttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22P3%22
effort1: easy (hours)https://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22effort1%3A%20easy%20(hours)%22
type: bug/fixhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%2Ffix%22
https://github.com/viki53
viki53https://github.com/viki53
on Dec 15, 2016https://github.com/angular/angular-cli/issues/3576#issue-195840711
Nexthttps://github.com/angular/angular-cli/issues/3576?timeline_page=1
https://github.com/hansl
hanslhttps://github.com/hansl
on Dec 15, 2016https://github.com/angular/angular-cli/issues/3576#issuecomment-267419820
hanslhttps://github.com/hansl
command: buildhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22command%3A%20build%22
effort1: easy (hours)https://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22effort1%3A%20easy%20(hours)%22
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgenthttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22P3%22
type: bug/fixhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%2Ffix%22
on Dec 15, 2016https://github.com/angular/angular-cli/issues/3576#event-895733790
Broccohttps://github.com/Brocco
on Dec 21, 2016https://github.com/angular/angular-cli/issues/3576#event-901127175
Broccohttps://github.com/Brocco
on Dec 21, 2016https://github.com/angular/angular-cli/issues/3576#event-901127355
bug(build): Remove moduleId from components when buildinghttps://github.com/Brocco/angular-cli/commit/f82202b74dded8d21cd16ba4c6db0fbdcf57d175
https://docs.github.com/articles/closing-issues-via-commit-messages
f82202bhttps://github.com/Brocco/angular-cli/commit/f82202b74dded8d21cd16ba4c6db0fbdcf57d175
bug(build): Remove moduleId from components when buildinghttps://github.com/Brocco/angular-cli/commit/70355b3d2fe5e1d8bdc07aa68ac1bedfc61a8508
https://docs.github.com/articles/closing-issues-via-commit-messages
70355b3https://github.com/Brocco/angular-cli/commit/70355b3d2fe5e1d8bdc07aa68ac1bedfc61a8508
bug(build): Remove moduleId from components when buildinghttps://github.com/Brocco/angular-cli/commit/c5cef28afd8a834dae75c483ca48380afcb67d70
https://docs.github.com/articles/closing-issues-via-commit-messages
c5cef28https://github.com/Brocco/angular-cli/commit/c5cef28afd8a834dae75c483ca48380afcb67d70
bug(build): Remove moduleId from components when buildinghttps://github.com/Brocco/angular-cli/commit/dc3d51722245f7add0bf26cbc10ffcd3aebfffc6
https://docs.github.com/articles/closing-issues-via-commit-messages
dc3d517https://github.com/Brocco/angular-cli/commit/dc3d51722245f7add0bf26cbc10ffcd3aebfffc6
bug(build): Remove moduleId from components when buildinghttps://github.com/Brocco/angular-cli/commit/607d1e5100e45a8397516af064082272744727ed
https://docs.github.com/articles/closing-issues-via-commit-messages
607d1e5https://github.com/Brocco/angular-cli/commit/607d1e5100e45a8397516af064082272744727ed
Broccohttps://github.com/Brocco
completedhttps://github.com/angular/angular-cli/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#3664https://github.com/angular/angular-cli/pull/3664
on Dec 22, 2016https://github.com/angular/angular-cli/issues/3576#event-903470078
Broccohttps://github.com/Brocco
on Dec 22, 2016https://github.com/angular/angular-cli/issues/3576#event-903470148
bug(build): Remove moduleId from components when building (#3664)https://github.com/angular/angular-cli/commit/50d73d29080f86ad66c6d4eb059c0dda21d46857
#3664https://github.com/angular/angular-cli/pull/3664
https://docs.github.com/articles/closing-issues-via-commit-messages
50d73d2https://github.com/angular/angular-cli/commit/50d73d29080f86ad66c6d4eb059c0dda21d46857
chaosmonsterhttps://github.com/chaosmonster
on Feb 4, 2017https://github.com/angular/angular-cli/issues/3576#event-949095028
This is commit that should show how to use moduleId to load external …https://github.com/chaosmonster/angular-library-starter/commit/29aa883aa72c7ef4df5948b3897eedde0f73482d
29aa883https://github.com/chaosmonster/angular-library-starter/commit/29aa883aa72c7ef4df5948b3897eedde0f73482d
MRHarrisonhttps://github.com/MRHarrison
on Feb 9, 2017https://github.com/angular/angular-cli/issues/3576#event-954790522
bug(build): Remove moduleId from components when building (angular#3664)https://github.com/MRHarrison/angular-cli/commit/7a8d9192ce7bfdb8368458490242b90c0246bd1b
angular#3664https://github.com/angular/angular-cli/pull/3664
https://docs.github.com/articles/closing-issues-via-commit-messages
7a8d919https://github.com/MRHarrison/angular-cli/commit/7a8d9192ce7bfdb8368458490242b90c0246bd1b
https://github.com/iamthechad
iamthechadhttps://github.com/iamthechad
on Feb 15, 2017https://github.com/angular/angular-cli/issues/3576#issuecomment-280046346
@arvsharmhttps://github.com/arvsharm
https://github.com/arvsharm
arvsharmhttps://github.com/arvsharm
on Feb 16, 2017https://github.com/angular/angular-cli/issues/3576#issuecomment-280269473
https://github.com/santonica
santonicahttps://github.com/santonica
on Feb 23, 2017https://github.com/angular/angular-cli/issues/3576#issuecomment-281882604
https://github.com/BlazerYang
BlazerYanghttps://github.com/BlazerYang
on Mar 8, 2017https://github.com/angular/angular-cli/issues/3576#issuecomment-285020497
https://goo.gl/wIDDiLhttps://goo.gl/wIDDiL
https://goo.gl/X2J8zchttps://goo.gl/X2J8zc
https://github.com/Brocco
Broccohttps://github.com/Brocco
on Mar 8, 2017https://github.com/angular/angular-cli/issues/3576#issuecomment-285180718
#5193https://github.com/angular/angular-cli/pull/5193
https://github.com/jackphang
jackphanghttps://github.com/jackphang
on Mar 24, 2017https://github.com/angular/angular-cli/issues/3576#issuecomment-288941803
https://github.com/mainak555
mainak555https://github.com/mainak555
on Mar 29, 2017https://github.com/angular/angular-cli/issues/3576#issuecomment-290187547
https://github.com/fletchsod-developer
fletchsod-developerhttps://github.com/fletchsod-developer
on May 11, 2017https://github.com/angular/angular-cli/issues/3576#issuecomment-300875604
https://github.com/felipeperezsanchez
felipeperezsanchezhttps://github.com/felipeperezsanchez
on Aug 7, 2017https://github.com/angular/angular-cli/issues/3576#issuecomment-320736483
https://github.com/magicianlee007
magicianlee007https://github.com/magicianlee007
on Oct 31, 2017https://github.com/angular/angular-cli/issues/3576#issuecomment-340636946
https://user-images.githubusercontent.com/30640392/32204045-bf944e4c-be32-11e7-8718-50864e9f7a3d.png
https://github.com/PanayotCankov
PanayotCankovhttps://github.com/PanayotCankov
on Nov 7, 2017https://github.com/angular/angular-cli/issues/3576#issuecomment-342423096
https://github.com/CWSCHREYER
CWSCHREYERhttps://github.com/CWSCHREYER
on Jul 9, 2018https://github.com/angular/angular-cli/issues/3576#issuecomment-403490582
https://github.com/apps/angular-automatic-lock-bot
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Sep 8, 2019https://github.com/angular/angular-cli/issues/3576#issuecomment-529182780
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 Sep 8, 2019https://github.com/angular/angular-cli/issues/3576#event-2616635176
mostafaibrhttps://github.com/mostafaibr
on May 29, 2026https://github.com/angular/angular-cli/issues/3576#event-26099473835
bug(build): Remove moduleId from components when building (angular#3664)https://github.com/mostafaibr/angular-cli/commit/18d7492a4b07254277401d39018f9a8f9df1e6a0
angular#3664https://github.com/angular/angular-cli/pull/3664
https://docs.github.com/articles/closing-issues-via-commit-messages
18d7492https://github.com/mostafaibr/angular-cli/commit/18d7492a4b07254277401d39018f9a8f9df1e6a0
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular-cli/issues/3576
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/3576
Broccohttps://github.com/Brocco
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgenthttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22P3%22
effort1: easy (hours)https://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22effort1%3A%20easy%20(hours)%22
type: bug/fixhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%2Ffix%22
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.