René's URL Explorer Experiment


Title: ERROR in RangeError: Maximum call stack size exceeded on production build and faulty export on module · Issue #8187 · angular/angular-cli · GitHub

Open Graph Title: ERROR in RangeError: Maximum call stack size exceeded on production build and faulty export on module · Issue #8187 · angular/angular-cli

X Title: ERROR in RangeError: Maximum call stack size exceeded on production build and faulty export on module · Issue #8187 · angular/angular-cli

Description: Bug Report or Feature Request (mark with an x) - [x] bug report - [ ] feature request Versions. @angular/cli: 1.4.9 node: 8.7.0 os: win32 x64 @angular/animations: 4.4.6 @angular/common: 4.4.6 @angular/compiler: 4.4.6 @angular/core: 4.4.6...

Open Graph Description: Bug Report or Feature Request (mark with an x) - [x] bug report - [ ] feature request Versions. @angular/cli: 1.4.9 node: 8.7.0 os: win32 x64 @angular/animations: 4.4.6 @angular/common: 4.4.6 @angu...

X Description: Bug Report or Feature Request (mark with an x) - [x] bug report - [ ] feature request Versions. @angular/cli: 1.4.9 node: 8.7.0 os: win32 x64 @angular/animations: 4.4.6 @angular/common: 4.4.6 @angu...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ERROR in RangeError: Maximum call stack size exceeded on production build and faulty export on module","articleBody":"### Bug Report or Feature Request (mark with an `x`)\r\n```\r\n- [x] bug report \r\n- [ ] feature request\r\n```\r\n\r\n### Versions.\r\n@angular/cli: 1.4.9\r\nnode: 8.7.0\r\nos: win32 x64\r\n@angular/animations: 4.4.6\r\n@angular/common: 4.4.6\r\n@angular/compiler: 4.4.6\r\n@angular/core: 4.4.6\r\n@angular/forms: 4.4.6\r\n@angular/http: 4.4.6\r\n@angular/platform-browser: 4.4.6\r\n@angular/platform-browser-dynamic: 4.4.6\r\n@angular/router: 4.4.6\r\n@angular/cli: 1.4.9\r\n@angular/compiler-cli: 4.4.6\r\n@angular/language-service: 4.4.6\r\ntypescript: 2.3.4\r\n\r\n### Repro steps.\r\nCreate a module and export the same module in the export tag (this is the fault)\r\n```\r\n@NgModule({\r\n  imports: [CommonModule],\r\n  exports: [ MyFaultyModule ],\r\n  declarations: [MyFaultyComponent],\r\n  providers: [],\r\n})\r\nexport class MyFaultyModule { }\r\n```\r\nBuild a production build:\r\nng build --prod\r\n\r\n### The log given by the failure.\r\nERROR in RangeError: Maximum call stack size exceeded\r\n    at StaticReflector.annotations (PathRemovedForDemo\\node_modules\\@angular\\compiler\\bundles\\compiler.umd.js:1:1)\r\n    at NgModuleResolver.resolve (PathRemovedForDemo\\node_modules\\@angular\\compiler\\bundles\\compiler.umd.js:14750:70)\r\n    at CompileMetadataResolver.getNgModuleMetadata (PathRemovedForDemo\\node_modules\\@angular\\compiler\\bundles\\compiler.umd.js:15402:60)\r\n    at CompileMetadataResolver.getNgModuleSummary (PathRemovedForDemo\\node_modules\\@angular\\compiler\\bundles\\compiler.umd.js:15358:52)\r\n    at PathRemovedForDemo\\node_modules\\@angular\\compiler\\bundles\\compiler.umd.js:15450:68\r\n    at Array.forEach (\u003canonymous>)\r\n    at CompileMetadataResolver.getNgModuleMetadata (PathRemovedForDemo\\node_modules\\@angular\\compiler\\bundles\\compiler.umd.js:15445:49)\r\n    at CompileMetadataResolver.getNgModuleSummary (PathRemovedForDemo\\node_modules\\@angular\\compiler\\bundles\\compiler.umd.js:15358:52)\r\n    at PathRemovedForDemo\\node_modules\\@angular\\compiler\\bundles\\compiler.umd.js:15450:68\r\n    at Array.forEach (\u003canonymous>)\r\n    at CompileMetadataResolver.getNgModuleMetadata (PathRemovedForDemo\\node_modules\\@angular\\compiler\\bundles\\compiler.umd.js:15445:49)\r\n    at CompileMetadataResolver.getNgModuleSummary (PathRemovedForDemo\\node_modules\\@angular\\compiler\\bundles\\compiler.umd.js:15358:52)\r\n    at PathRemovedForDemo\\node_modules\\@angular\\compiler\\bundles\\compiler.umd.js:15450:68\r\n    at Array.forEach (\u003canonymous>)\r\n    at CompileMetadataResolver.getNgModuleMetadata (PathRemovedForDemo\\node_modules\\@angular\\compiler\\bundles\\compiler.umd.js:15445:49)\r\n    at CompileMetadataResolver.getNgModuleSummary (PathRemovedForDemo\\node_modules\\@angular\\compiler\\bundles\\compiler.umd.js:15358:52)\r\n\r\n### Desired functionality.\r\nThe ng cli should detect this fault and report the module that causes the call stack exception\r\n\r\n### Mention any other details that might be useful.\r\nThe issue can be found in **compile.umd.js**:\r\nfunction: **CompileMetadataResolver.prototype.getNgModuleMetadata **\r\nOn the code:\r\n\r\n```\r\n if (meta.exports) {\r\n            flattenAndDedupeArray(meta.exports).forEach(function (exportedType) {\r\n                if (!isValidType(exportedType)) {\r\n                    _this._reportError(syntaxError(\"Unexpected value '\" + stringifyType(exportedType) + \"' exported by the module '\" + stringifyType(moduleType) + \"'\"), moduleType);\r\n                    return;\r\n                }\r\n                var /** @type {?} */ exportedModuleSummary = _this.getNgModuleSummary(exportedType);                 if (exportedModuleSummary) {\r\n                    exportedModules.push(exportedModuleSummary);\r\n                }\r\n                else {\r\n                    exportedNonModuleIdentifiers.push(_this._getIdentifierMetadata(exportedType));\r\n                }\r\n            });\r\n        }\r\n```\r\n\r\n**var  exportedModuleSummary = _this.getNgModuleSummary(exportedType); \r\n=> this cause the recursion and endless loop because 'getNgModuleMetadata ' is called again for the same module** \r\n\r\nSo my suggestion is watch how deep the recusion is going, and for example start logging warnings when reached 5 nested call.\r\nSomething like this:\r\n\r\n```\r\nCompileMetadataResolver.prototype.getNgModuleMetadata = function (moduleType, throwIfNotFound, nested = 0) {\r\n        nested++;\r\n        if(nested > 4) console.warn(´nested module {moduleType.name} (level: ${nested})´)\r\n```\r\nof course function calling **getNgModuleMetadata** should be modified to.\r\n\r\nCan someone on the core cli team confirm this is a good approach?\r\n\r\nAnother approach is of course checking for the module name that is calling it self, but suppose you have something like this moduleX=>export moduleY=>exportmoduleX...\r\n\r\nIf so, I will create a pull request","author":{"url":"https://github.com/BartNetJS","@type":"Person","name":"BartNetJS"},"datePublished":"2017-10-25T18:01:31Z","url":"https://github.com/angular/angular-cli/issues/8187"}

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:0e0a4bb9-6f89-cdb9-80c2-ff7a46d0ac15
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC2D0:21E3E7:1ADD8FD:2357E6B:6B014B7B
html-safe-noncef18fd4230917f565a729560224f6e28802f49abef83abd59d76b573beb50b0c4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMkQwOjIxRTNFNzoxQUREOEZEOjIzNTdFNkI6NkIwMTRCN0IiLCJ2aXNpdG9yX2lkIjoiNjY5NTc4MTI4NTI4MzA1NjUwNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacb0b6e244510c33b27e5b35e0705841f27b8762aaa9f3ba9d9af674edf4c33852
hovercard-subject-tagissue:268492923
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/8187/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b6e7b819105d4830f1f7a1d7a86f74ff9c1753f6de597c8977467cee7d1d9e52/angular/angular-cli/issues/8187
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b6e7b819105d4830f1f7a1d7a86f74ff9c1753f6de597c8977467cee7d1d9e52/angular/angular-cli/issues/8187
og:image:altBug Report or Feature Request (mark with an x) - [x] bug report - [ ] feature request Versions. @angular/cli: 1.4.9 node: 8.7.0 os: win32 x64 @angular/animations: 4.4.6 @angular/common: 4.4.6 @angu...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameBartNetJS
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/8187#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular-cli%2Fissues%2F8187
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%2F8187
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/8187
Reloadhttps://github.com/angular/angular-cli/issues/8187
Reloadhttps://github.com/angular/angular-cli/issues/8187
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/8187
New issuehttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/8187
ERROR in RangeError: Maximum call stack size exceeded on production build and faulty export on modulehttps://github.com/angular/angular-cli/issues/8187#top
https://github.com/BartNetJS
BartNetJShttps://github.com/BartNetJS
on Oct 25, 2017https://github.com/angular/angular-cli/issues/8187#issue-268492923
https://github.com/jwuliger
jwuligerhttps://github.com/jwuliger
on Oct 27, 2017https://github.com/angular/angular-cli/issues/8187#issuecomment-339838655
https://github.com/filipesilva
filipesilvahttps://github.com/filipesilva
on Oct 27, 2017https://github.com/angular/angular-cli/issues/8187#issuecomment-339971770
angular/angular#19979https://github.com/angular/angular/issues/19979
filipesilvahttps://github.com/filipesilva
completedhttps://github.com/angular/angular-cli/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Oct 27, 2017https://github.com/angular/angular-cli/issues/8187#event-1313926453
https://github.com/apps/angular-automatic-lock-bot
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Sep 7, 2019https://github.com/angular/angular-cli/issues/8187#issuecomment-529114127
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 7, 2019https://github.com/angular/angular-cli/issues/8187#event-2616244058
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular-cli/issues/8187
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/8187
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.