René's URL Explorer Experiment


Title: Error "Please add a @NgModule annotation" in Angular4 · Issue #15763 · angular/angular · GitHub

Open Graph Title: Error "Please add a @NgModule annotation" in Angular4 · Issue #15763 · angular/angular

X Title: Error "Please add a @NgModule annotation" in Angular4 · Issue #15763 · angular/angular

Description: I'm submitting a ... (check one with "x") [X] bug report Current behavior I have an Angular application which imports a module from another repository. So my app.module.ts @NgModule({ imports: [ ... MyCommonModule, ], declarations: [...]...

Open Graph Description: I'm submitting a ... (check one with "x") [X] bug report Current behavior I have an Angular application which imports a module from another repository. So my app.module.ts @NgModule({ imports: [ .....

X Description: I'm submitting a ... (check one with "x") [X] bug report Current behavior I have an Angular application which imports a module from another repository. So my app.module.ts @NgModule({...

Opengraph URL: https://github.com/angular/angular/issues/15763

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Error \"Please add a @NgModule annotation\" in Angular4","articleBody":"**I'm submitting a ...**  (check one with \"x\")\r\n```\r\n[X] bug report\r\n```\r\n\r\n**Current behavior**\r\nI have an Angular application which imports a module from another repository.\r\n\r\nSo my app.module.ts\r\n```\r\n@NgModule({\r\n  imports: [\r\n    ...\r\n    MyCommonModule,\r\n  ],\r\n  declarations: [...],\r\n  providers: [...],\r\n  bootstrap: [AppComponent]\r\n})\r\nexport class AppModule { }\r\n```\r\nand then in my node_modules I have my common repository (installed with yarn/npm in package.json) with the file file my-common-module.d.ts\r\n```\r\n@NgModule({\r\n  imports: [...],\r\n  declarations: [...],\r\n  providers: [...],\r\n  exports: [...]\r\n})\r\nexport class MyCommonModule {}\r\n```\r\n\r\nThis works fine with Angular 2.\r\nNow, I delete node_modules and change the version of Angular to 4.0 in the package.json of my app and then yarn again.\r\nI build the app with webpack, no errors, and when I run it I get the following error in the browser\r\n```\r\nUncaught Error: Unexpected value 'MyCommonModule' imported by the module 'AppModule'. Please add a @NgModule annotation.\r\n```\r\n\r\n**Expected behavior**\r\nI'd expect this to work the same with Angular4 or Angular2.\r\n\r\nMy question is, do I need to also upgrade the common module to Angular4 for this to work? I thought that this would already be transpiled to js when I import it in my main app module, maybe I'm wrong.\r\n\r\n**Please tell us about your environment:**\r\nI tested this with webpack-dev-server\r\n\r\n* **Angular version:** 2.0.X\r\nWith 2.0.0 it's working, with 4.0.0 it's not.\r\n\r\n* **Browser:**\r\nI tested this in Chrome and FF.\r\n \r\n* **Language:**\r\nI'm using typescript 2.2.2\r\n\r\n* **Node (for AoT issues):** `node --version` =   \r\n","author":{"url":"https://github.com/davidanaya","@type":"Person","name":"davidanaya"},"datePublished":"2017-04-04T17:00:12Z","url":"https://github.com/angular/angular/issues/15763"}

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:234bf7a1-7503-0f2e-5afc-788b979c1b76
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD0FA:172B92:3912CD9:4C036E4:6B021D2A
html-safe-nonce823ef1351ee5b4a93b46ee14def967d54e26197d4b68725f02442c0a1c816ad9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMEZBOjE3MkI5MjozOTEyQ0Q5OjRDMDM2RTQ6NkIwMjFEMkEiLCJ2aXNpdG9yX2lkIjoiMjk0MzMzODk3NjYyMDE5MTAxOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac445fc2ae0231d89dad75f3f5c1ca03181b9ee9647644fbf01f9f837266b7ef99
hovercard-subject-tagissue:219317586
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/15763/issue_layout
twitter:imagehttps://opengraph.githubassets.com/4792edf7658310a18cc413a75ade58b7afcf3b8fc8d60fc2a33cf3848a8bcd40/angular/angular/issues/15763
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/4792edf7658310a18cc413a75ade58b7afcf3b8fc8d60fc2a33cf3848a8bcd40/angular/angular/issues/15763
og:image:altI'm submitting a ... (check one with "x") [X] bug report Current behavior I have an Angular application which imports a module from another repository. So my app.module.ts @NgModule({ imports: [ .....
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedavidanaya
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
go-importgithub.com/angular/angular git https://github.com/angular/angular.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id24195339
octolytics-dimension-repository_nwoangular/angular
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id24195339
octolytics-dimension-repository_network_root_nwoangular/angular
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/issues/15763#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F15763
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%2Fissues%2F15763
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
Reloadhttps://github.com/angular/angular/issues/15763
Reloadhttps://github.com/angular/angular/issues/15763
Reloadhttps://github.com/angular/angular/issues/15763
angularhttps://github.com/angular
angularhttps://github.com/angular/angular
Codehttps://github.com/angular/angular
Issues835 (835)https://github.com/angular/angular/issues
Pull requests142 (142)https://github.com/angular/angular/pulls
Discussionshttps://github.com/angular/angular/discussions
Actionshttps://github.com/angular/angular/actions
Projectshttps://github.com/angular/angular/projects
Security and quality40 (40)https://github.com/angular/angular/security
Insightshttps://github.com/angular/angular/insights
https://github.com/angular/angular
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/15763
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/15763
Error "Please add a @NgModule annotation" in Angular4https://github.com/angular/angular/issues/15763#top
https://github.com/davidanaya
davidanayahttps://github.com/davidanaya
on Apr 4, 2017https://github.com/angular/angular/issues/15763#issue-219317586
Nexthttps://github.com/angular/angular/issues/15763?timeline_page=1
https://github.com/DzmitryShylovich
DzmitryShylovichhttps://github.com/DzmitryShylovich
on Apr 4, 2017https://github.com/angular/angular/issues/15763#issuecomment-291565725
https://github.com/davidanaya
davidanayahttps://github.com/davidanaya
on Apr 4, 2017https://github.com/angular/angular/issues/15763#issuecomment-291570878
https://github.com/DzmitryShylovich
DzmitryShylovichhttps://github.com/DzmitryShylovich
on Apr 4, 2017https://github.com/angular/angular/issues/15763#issuecomment-291571820
https://github.com/davidanaya
davidanayahttps://github.com/davidanaya
on Apr 4, 2017https://github.com/angular/angular/issues/15763#issuecomment-291572828
https://github.com/kukjevov
kukjevovhttps://github.com/kukjevov
on Apr 4, 2017https://github.com/angular/angular/issues/15763#issuecomment-291577486
https://github.com/davidanaya
davidanayahttps://github.com/davidanaya
on Apr 5, 2017https://github.com/angular/angular/issues/15763#issuecomment-291773856
@kukjevovhttps://github.com/kukjevov
@Toxicablehttps://github.com/Toxicable
https://github.com/robwormald
robwormaldhttps://github.com/robwormald
on Apr 5, 2017https://github.com/angular/angular/issues/15763#issuecomment-291777074
https://github.com/davidanaya
davidanayahttps://github.com/davidanaya
on Apr 5, 2017https://github.com/angular/angular/issues/15763#issuecomment-291780787
@robwormaldhttps://github.com/robwormald
https://github.com/kukjevov
kukjevovhttps://github.com/kukjevov
on Apr 5, 2017https://github.com/angular/angular/issues/15763#issuecomment-291788917
@davidanayahttps://github.com/davidanaya
https://github.com/davidanaya
davidanayahttps://github.com/davidanaya
on Apr 5, 2017https://github.com/angular/angular/issues/15763#issuecomment-291793990
@kukjevovhttps://github.com/kukjevov
https://github.com/davidanaya
davidanayahttps://github.com/davidanaya
on Apr 5, 2017https://github.com/angular/angular/issues/15763#issuecomment-291812276
@kukjevovhttps://github.com/kukjevov
davidanayahttps://github.com/davidanaya
completedhttps://github.com/angular/angular/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Apr 5, 2017https://github.com/angular/angular/issues/15763#event-1030061999
https://github.com/IevhenIkonnykov
IevhenIkonnykovhttps://github.com/IevhenIkonnykov
on Apr 10, 2017https://github.com/angular/angular/issues/15763#issuecomment-292917961
@componenthttps://github.com/component
http://localhost:4200/vendor.bundle.js:53165:34http://localhost:4200/vendor.bundle.js:53165:34
http://localhost:4200/vendor.bundle.js:65680:40http://localhost:4200/vendor.bundle.js:65680:40
http://localhost:4200/vendor.bundle.js:65662:54http://localhost:4200/vendor.bundle.js:65662:54
http://localhost:4200/vendor.bundle.js:76740:64http://localhost:4200/vendor.bundle.js:76740:64
http://localhost:4200/vendor.bundle.js:76699:52http://localhost:4200/vendor.bundle.js:76699:52
http://localhost:4200/vendor.bundle.js:76661:21http://localhost:4200/vendor.bundle.js:76661:21
http://localhost:4200/vendor.bundle.js:5145:25http://localhost:4200/vendor.bundle.js:5145:25
http://localhost:4200/vendor.bundle.js:5131:21http://localhost:4200/vendor.bundle.js:5131:21
http://localhost:4200/main.bundle.js:16726:124http://localhost:4200/main.bundle.js:16726:124
http://localhost:4200/inline.bundle.js:53:30http://localhost:4200/inline.bundle.js:53:30
http://localhost:4200/main.bundle.js:45437:18http://localhost:4200/main.bundle.js:45437:18
http://localhost:4200/inline.bundle.js:53:30http://localhost:4200/inline.bundle.js:53:30
http://localhost:4200/inline.bundle.js:24:23http://localhost:4200/inline.bundle.js:24:23
@componenthttps://github.com/component
@inputhttps://github.com/input
@NgModulehttps://github.com/NgModule
https://github.com/IevhenIkonnykov
IevhenIkonnykovhttps://github.com/IevhenIkonnykov
on Apr 10, 2017https://github.com/angular/angular/issues/15763#issuecomment-292918642
herehttps://github.com/angular/angular-cli/issues/5007
https://github.com/PostImpatica
PostImpaticahttps://github.com/PostImpatica
on Apr 18, 2017https://github.com/angular/angular/issues/15763#issuecomment-294660298
https://github.com/rudzikdawid
rudzikdawidhttps://github.com/rudzikdawid
on Nov 26, 2017https://github.com/angular/angular/issues/15763#issuecomment-346976738
https://github.com/swiety85/angular2gridster/tree/137-demo-src-app-gridsterhttps://github.com/swiety85/angular2gridster/tree/137-demo-src-app-gridster
https://camo.githubusercontent.com/e81719f2aa46076f617b1c822eae78683f84012ec5ea4309606a887b6c1bdcf0/68747470733a2f2f692e696d6775722e636f6d2f4e6159426378652e706e67
https://github.com/OnlyBelter
OnlyBelterhttps://github.com/OnlyBelter
on Dec 12, 2017https://github.com/angular/angular/issues/15763#issuecomment-350936373
https://github.com/bDino
bDinohttps://github.com/bDino
on Dec 12, 2017https://github.com/angular/angular/issues/15763#issuecomment-351023320
https://github.com/srinivas444
srinivas444https://github.com/srinivas444
on Mar 29, 2018https://github.com/angular/angular/issues/15763#issuecomment-377144913
@typeshttps://github.com/types
https://github.com/raviprajna
raviprajnahttps://github.com/raviprajna
on May 19, 2018https://github.com/angular/angular/issues/15763#issuecomment-390411335
@NgModulehttps://github.com/NgModule
https://github.com/Jayawardhana
Jayawardhanahttps://github.com/Jayawardhana
on Jun 13, 2018https://github.com/angular/angular/issues/15763#issuecomment-396927625
https://github.com/lazarljubenovic
lazarljubenovichttps://github.com/lazarljubenovic
on Jun 13, 2018https://github.com/angular/angular/issues/15763#issuecomment-396997189
@Jayawardhanahttps://github.com/Jayawardhana
https://github.com/rsprince
rsprincehttps://github.com/rsprince
on Sep 17, 2018https://github.com/angular/angular/issues/15763#issuecomment-422035113
https://github.com/lazarljubenovic
lazarljubenovichttps://github.com/lazarljubenovic
on Sep 17, 2018https://github.com/angular/angular/issues/15763#issuecomment-422049325
https://github.com/vilbara
vilbarahttps://github.com/vilbara
on Dec 17, 2018https://github.com/angular/angular/issues/15763#issuecomment-447767042
https://github.com/nejsimon
nejsimonhttps://github.com/nejsimon
on Jun 19, 2019https://github.com/angular/angular/issues/15763#issuecomment-503445143
https://github.com/yanqiw
yanqiwhttps://github.com/yanqiw
on Jul 15, 2019https://github.com/angular/angular/issues/15763#issuecomment-511413558
https://github.com/kimamula
kimamulahttps://github.com/kimamula
on Jul 19, 2019https://github.com/angular/angular/issues/15763#issuecomment-513258750
https://github.com/apps/angular-automatic-lock-bot
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Sep 15, 2019https://github.com/angular/angular/issues/15763#issuecomment-531545329
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 15, 2019https://github.com/angular/angular/issues/15763#event-2634531190
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular/issues/15763
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular/issues/15763
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.