Title: AOT error when referencing components from another project · Issue #6059 · angular/angular-cli · GitHub
Open Graph Title: AOT error when referencing components from another project · Issue #6059 · angular/angular-cli
X Title: AOT error when referencing components from another project · Issue #6059 · angular/angular-cli
Description: Bug Report or Feature Request (mark with an x) - [x ] bug report -> please search issues before submitting - [ ] feature request Versions. $ ng --version @angular/cli: 1.0.0 node: 7.8.0 os: linux x64 @angular/common: 4.0.3 @angular/compi...
Open Graph Description: Bug Report or Feature Request (mark with an x) - [x ] bug report -> please search issues before submitting - [ ] feature request Versions. $ ng --version @angular/cli: 1.0.0 node: 7.8.0 os: linux x...
X Description: Bug Report or Feature Request (mark with an x) - [x ] bug report -> please search issues before submitting - [ ] feature request Versions. $ ng --version @angular/cli: 1.0.0 node: 7.8.0 os: linu...
Opengraph URL: https://github.com/angular/angular-cli/issues/6059
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"AOT error when referencing components from another project","articleBody":"\u003c!--\r\nIF YOU DON'T FILL OUT THE FOLLOWING INFORMATION YOUR ISSUE MIGHT BE CLOSED WITHOUT INVESTIGATING\r\n--\u003e\r\n### Bug Report or Feature Request (mark with an `x`)\r\n```\r\n- [x ] bug report -\u003e please search issues before submitting\r\n- [ ] feature request\r\n```\r\n\r\n### Versions.\r\n\u003c!--\r\nOutput from: `ng --version`.\r\nIf nothing, output from: `node --version` and `npm --version`.\r\n Windows (7/8/10). Linux (incl. distribution). macOS (El Capitan? Sierra?)\r\n--\u003e\r\n$ ng --version\r\n\r\n@angular/cli: 1.0.0\r\nnode: 7.8.0\r\nos: linux x64\r\n@angular/common: 4.0.3\r\n@angular/compiler: 4.0.3\r\n@angular/core: 4.0.3\r\n@angular/forms: 4.0.3\r\n@angular/http: 4.0.3\r\n@angular/platform-browser: 4.0.3\r\n@angular/platform-browser-dynamic: 4.0.3\r\n@angular/router: 4.0.3\r\n@angular/cli: 1.0.0\r\n@angular/compiler-cli: 4.0.3\r\n\r\n### Repro steps.\r\n\u003c!--\r\nSimple steps to reproduce this bug.\r\nPlease include: commands run, packages added, related code changes.\r\nA link to a sample repo would help too.\r\n--\u003e\r\nClone the git project : https://github.com/mbail/aot-error.git\r\nnpm install\r\nnpm run build (or ng build --aot)\r\n\r\nThis is a bug when building with AOT (it builds fine with JIT).\r\n\r\nI have two projects. The project A has a (git) dependency on project B. The project B contains a ParentComponent whose template refers to a child component selector (\u003cchild\u003e). The project A contains the ChildComponent (with selector \u003cchild\u003e), and a module declaring the two components (ParentComponent and ChildComponent).\r\n\r\n### The log given by the failure.\r\n\u003c!-- Normally this include a stack trace and some more information. --\u003e\r\n\r\nERROR in /home/muriel/Workspace/aot-error/src/$$_gendir/node_modules/aot-error-dep/src/app/parent.component.ngfactory.ts (1,1): Cannot find module '../../../../../$_gendir/app/child.component.ngfactory'.\r\n\r\nERROR in ./src/$$_gendir/~/aot-error-dep/src/app/parent.component.ngfactory.ts\r\nModule not found: Error: Can't resolve '../../../../../$_gendir/app/child.component.ngfactory' in '/home/muriel/Workspace/aot-error/src/$$_gendir/node_modules/aot-error-dep/src/app'\r\n @ ./src/$$_gendir/~/aot-error-dep/src/app/parent.component.ngfactory.ts 8:0-81\r\n @ ./src/$$_gendir/app/app.module.ngfactory.ts\r\n @ ./src/main.ts\r\n @ multi ./src/main.ts\r\n\r\n\r\n### Desired functionality.\r\n\u003c!--\r\nWhat would like to see implemented?\r\nWhat is the usecase?\r\n--\u003e\r\nNo error when building AOT, just like the JIT.\r\nI need to have components in an external git project used to be shared with multiple other projects. So I need to be able to have a parent component in another project that the project containing the child component.\r\n\r\n### Mention any other details that might be useful.\r\n\u003c!-- Please include a link to the repo if this is related to an OSS project. --\u003e\r\n\r\n","author":{"url":"https://github.com/mbail","@type":"Person","name":"mbail"},"datePublished":"2017-04-24T12:39:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/6059/angular-cli/issues/6059"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e1555e1d-f915-2774-700d-aa1526246fec |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EB54:54BD2:5E0108:7D9ADE:6973F420 |
| html-safe-nonce | d7faa952d3a99ea7af30c3980fb905e9ef551bf934e3990d98d109aca490e011 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjU0OjU0QkQyOjVFMDEwODo3RDlBREU6Njk3M0Y0MjAiLCJ2aXNpdG9yX2lkIjoiMTczNTY1MDg2NjUyNzIwNDM4NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e64094f0c71e8567038f0dd47a188e78242fba80d48ecf401d7b8c2a17083006 |
| hovercard-subject-tag | issue:223806011 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/6059/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d58518101a489cc31b5f1120ea0e1625c5d252d1643b6d92177685a5303136e7/angular/angular-cli/issues/6059 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d58518101a489cc31b5f1120ea0e1625c5d252d1643b6d92177685a5303136e7/angular/angular-cli/issues/6059 |
| og:image:alt | Bug Report or Feature Request (mark with an x) - [x ] bug report -> please search issues before submitting - [ ] feature request Versions. $ ng --version @angular/cli: 1.0.0 node: 7.8.0 os: linux x... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mbail |
| hostname | github.com |
| expected-hostname | github.com |
| None | edd166dbd7a8c69304dd0f786a2ceae171d7a532d7f82516d7b971b6a831123e |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7f2d62d773fd1f2c679e2ea93329a72fda65310a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width