Title: NG6002/NG6003: Ivy with yarn workspaces and hoisting (repro) · Issue #35747 · angular/angular · GitHub
Open Graph Title: NG6002/NG6003: Ivy with yarn workspaces and hoisting (repro) · Issue #35747 · angular/angular
X Title: NG6002/NG6003: Ivy with yarn workspaces and hoisting (repro) · Issue #35747 · angular/angular
Description: 🐞 bug report Affected Package The issue is probably caused by package @angular/compiler Is this a regression? Not sure. Did not use Ivy before. Description There is an error when compiling with Ivy when using yarn workspaces and the angu...
Open Graph Description: 🐞 bug report Affected Package The issue is probably caused by package @angular/compiler Is this a regression? Not sure. Did not use Ivy before. Description There is an error when compiling with Ivy...
X Description: 🐞 bug report Affected Package The issue is probably caused by package @angular/compiler Is this a regression? Not sure. Did not use Ivy before. Description There is an error when compiling with Ivy...
Opengraph URL: https://github.com/angular/angular/issues/35747
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"NG6002/NG6003: Ivy with yarn workspaces and hoisting (repro)","articleBody":"\u003c!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅\r\n\r\nOh hi there! 😄\r\n\r\nTo expedite issue processing please search open and closed issues before submitting a new one.\r\nExisting issues often contain information about workarounds, resolution, or progress updates.\r\n\r\n🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅-->\r\n\r\n\r\n# 🐞 bug report\r\n\r\n### Affected Package\r\n The issue is probably caused by package @angular/compiler\r\n\r\n### Is this a regression?\r\n\r\nNot sure. Did not use Ivy before.\r\n\r\n### Description\r\n\r\nThere is an error when compiling with Ivy when using yarn workspaces and the angular libraries are hoisted to the root `node_modules` in a particular way by yarn.\r\n\r\nI have attached a repro.\r\n\r\n## 🔬 Minimal Reproduction\r\n\r\nRepro at: https://github.com/andreialecu/ang9-ng6002\r\n\r\nRun \r\n```bash\r\nyarn\r\nyarn repro\r\n```\r\n^ Fails\r\n\r\nNote that if you delete the `library` directory from under `packages`, the compilation will finish just fine.\r\n\r\n```\r\nrm -rf packages/library\r\nyarn && yarn repro\r\n```\r\n^ Works\r\n\r\nAlternatively, adding `enableIvy: false` to tsconfig.json also works.\r\n\r\n## 🔥 Exception or Error\r\n\u003cpre>\u003ccode>\r\n0% compiling\r\nCompiling @ngx-loading-bar/http-client : es2015 as esm2015\r\n\r\nchunk {main} main.js, main.js.map (main) 2.04 kB [initial] [rendered]\r\nchunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 701 bytes [initial] [rendered]\r\nchunk {runtime} runtime.js, runtime.js.map (runtime) 6.15 kB [entry] [rendered]\r\nchunk {styles} styles.js, styles.js.map (styles) 10.5 kB [initial] [rendered]\r\nchunk {vendor} vendor.js, vendor.js.map (vendor) 341 kB [initial] [rendered]\r\nDate: 2020-02-28T07:56:25.844Z - Hash: f57d00fadb4a1cc320dd - Time: 4147ms\r\n\r\nERROR in Failed to compile entry-point @ngx-loading-bar/http-client (es2015 as esm2015) due to compilation errors:\r\n../../node_modules/@angular/common/http/http.d.ts:2801:22 - error NG6002: Appears in the NgModule.imports of LoadingBarHttpClientModule, but could not be resolved to an NgModule class.\r\n\r\nThis likely means that the library (@angular/common/http) which declares HttpClientModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.\r\n\r\n2801 export declare class HttpClientModule {\r\n ~~~~~~~~~~~~~~~~\r\n../../node_modules/@angular/common/http/http.d.ts:2801:22 - error NG6003: Appears in the NgModule.exports of LoadingBarHttpClientModule, but could not be resolved to an NgModule, Component, Directive, or Pipe class.\r\n\r\nThis likely means that the library (@angular/common/http) which declares HttpClientModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.\r\n\r\n2801 export declare class HttpClientModule {\r\n ~~~~~~~~~~~~~~~~\r\n\u003c/code>\u003c/pre>\r\n\r\n\r\n## 🌍 Your Environment\r\n\r\n**Angular Version:**\r\n\u003cpre>\u003ccode>\r\n\u003c!-- run `ng version` and paste output below -->\r\n\u003c!-- ✍️-->\r\nAngular CLI: 9.0.4\r\nNode: 13.7.0\r\nOS: linux x64\r\n\r\nAngular: 9.0.4\r\n... animations, cli, common, compiler, compiler-cli, core, forms\r\n... language-service, platform-browser, platform-browser-dynamic\r\n... router\r\nIvy Workspace: \u003cerror>\r\n\r\nPackage Version\r\n-----------------------------------------------------------\r\n@angular-devkit/architect 0.900.4\r\n@angular-devkit/build-angular 0.900.4\r\n@angular-devkit/build-optimizer 0.900.4\r\n@angular-devkit/build-webpack 0.900.4\r\n@angular-devkit/core 9.0.4\r\n@angular-devkit/schematics 9.0.4\r\n@ngtools/webpack 9.0.4\r\n@schematics/angular 9.0.4\r\n@schematics/update 0.900.4\r\nrxjs 6.5.4\r\ntypescript 3.7.5\r\nwebpack 4.41.2\r\n\u003c/code>\u003c/pre>\r\n\r\n**Anything else relevant?**\r\n\u003c!-- ✍️Is this a browser specific issue? If so, please specify the browser and version. -->\r\n\r\n\u003c!-- ✍️Do any of these matter: operating system, IDE, package manager, HTTP server, ...? If so, please mention it below. -->\r\n\r\nProbably related to path resolution, workspaces use symlink. Also related: https://github.com/angular/angular/issues/35447","author":{"url":"https://github.com/andreialecu","@type":"Person","name":"andreialecu"},"datePublished":"2020-02-28T08:03:24Z","url":"https://github.com/angular/angular/issues/35747"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ec398d99-bb51-f430-83a8-532f8972a2d5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C0B4:237673:1268FF1:1899B60:6B0123B6 |
| html-safe-nonce | 18bbc7fa0fa29aaba513da5da69faa3a62d4f8d217c473e6160659dcab4ba6f3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMEI0OjIzNzY3MzoxMjY4RkYxOjE4OTlCNjA6NkIwMTIzQjYiLCJ2aXNpdG9yX2lkIjoiMjczODUwOTQyNjQ3MzM3ODc0MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3b8a7605911dd039a367abbdf99963e9c282f84d0cef824d53f5c6d8666fa486 |
| hovercard-subject-tag | issue:572593148 |
| 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/35747/issue_layout |
| twitter:image | https://opengraph.githubassets.com/19a8d582d7c758ecea1995d4940c65fe59bce09b2d1db437ac109bfdbacce6a3/angular/angular/issues/35747 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/19a8d582d7c758ecea1995d4940c65fe59bce09b2d1db437ac109bfdbacce6a3/angular/angular/issues/35747 |
| og:image:alt | 🐞 bug report Affected Package The issue is probably caused by package @angular/compiler Is this a regression? Not sure. Did not use Ivy before. Description There is an error when compiling with Ivy... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | andreialecu |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width