Title: Error NG6002: Upgraded LIB to NG9 · Issue #36185 · angular/angular · GitHub
Open Graph Title: Error NG6002: Upgraded LIB to NG9 · Issue #36185 · angular/angular
X Title: Error NG6002: Upgraded LIB to NG9 · Issue #36185 · angular/angular
Description: 🐞 bug report Affected Package There is a similar problem #35536 and if I follow instructions from this issue it works as a workaround Is this a regression? Yes. NG8 has no problem compiling local libs and local app to test it. Descriptio...
Open Graph Description: 🐞 bug report Affected Package There is a similar problem #35536 and if I follow instructions from this issue it works as a workaround Is this a regression? Yes. NG8 has no problem compiling local l...
X Description: 🐞 bug report Affected Package There is a similar problem #35536 and if I follow instructions from this issue it works as a workaround Is this a regression? Yes. NG8 has no problem compiling local l...
Opengraph URL: https://github.com/angular/angular/issues/36185
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Error NG6002: Upgraded LIB to NG9","articleBody":"# 🐞 bug report\r\n\r\n### Affected Package\r\nThere is a similar problem https://github.com/angular/angular/issues/35536 and if I follow instructions from this issue it works as a workaround\r\n\r\n\r\n\r\n### Is this a regression?\r\nYes. NG8 has no problem compiling local libs and local app to test it. \r\n\r\n### Description\r\n\r\nAs you can see it here at [MetaUI](https://github.com/ngx-meta/rules/tree/ng9), I have `libs` and `apps` folders. \r\n\r\n**Libs** contains two libraries ( that we shoudl care about now):\r\n - **rules** - core rules engine library\r\n - **material-rules** - Specific UI library implementation for rules. It also uses and imports core `rules` library\r\n\r\nThen I have **apps** as playground: \r\n - **material-app**: which imports both libraries. \r\n\r\nThe normal workflow in NG8 to be able to test `material-app` was:\r\n\r\n```\r\nng build rules \r\nng build material-rules\r\nng build material-app\r\nng serve material-app\r\n```\r\n\r\nNow `ng build material-app` fails with **NG6002 & NG6003** errors.\r\n\r\nBut if I follow #35536, and run ` npx ngcc && ngcc -s dist` before building `material-app`, all works. so Running:\r\n\r\n```\r\nrm -Rf dist && ng build rules && ng build material-rules && npx ngcc && ngcc -s dist\r\nng build material-app\r\n```\r\nfixes problem \r\n\r\n## 🔬 Minimal Reproduction \r\n\r\n```\r\ngit clone -b ng9 https://github.com/ngx-meta/rules.git\r\ncd rules/\r\nnpm install\r\n\r\n// Now you can run to see errors\r\nrm -Rf dist && ng build rules && ng build material-rules && ng build material-app\r\n\r\n// run to fix it\r\nrm -Rf dist && ng build rules && ng build material-rules && npx ngcc && ngcc -s dist\r\nng build material-app\r\n\r\n```\r\n\r\n\r\n\r\n## 🔥 Exception or Error\r\n\u003cpre>\u003ccode>\r\n\r\nERROR in dist/libs/rules/lib/metaui/rules.module.d.ts:27:22 - error NG6002: Appears in the NgModule.imports of MetaUILibLayoutModule, but could not be resolved to an NgModule class.\r\n\r\nThis likely means that the dependency (@ngx-metaui/rules) which declares MetaUIRulesModule has not been processed correctly by ngcc.\r\n\r\n27 export declare class MetaUIRulesModule {\r\n ~~~~~~~~~~~~~~~~~\r\nlibs/material-rules/src/lib/metaui/meta-ui-layout.module.ts:71:14 - error NG6002: Appears in the NgModule.imports of MaterialRulesModule, but itself has errors\r\n\r\n71 export class MetaUILibLayoutModule {\r\n ~~~~~~~~~~~~~~~~~~~~~\r\ndist/libs/rules/lib/metaui/rules.module.d.ts:27:22 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.\r\n\r\nThis likely means that the dependency (@ngx-metaui/rules) which declares MetaUIRulesModule has not been processed correctly by ngcc.\r\n\r\n27 export declare class MetaUIRulesModule {\r\n ~~~~~~~~~~~~~~~~~\r\nlibs/material-rules/src/lib/material-rules.module.ts:40:14 - error NG6002: Appears in the NgModule.imports of AppModule, but itself has errors\r\n\r\n40 export class MaterialRulesModule {\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\nAngular CLI: 9.0.6\r\nNode: 12.0.0\r\nOS: darwin x64\r\n\r\nAngular: 9.0.7\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... language-service, platform-browser, platform-browser-dynamic\r\n... router\r\nIvy Workspace: Yes\r\n\r\nPackage Version\r\n------------------------------------------------------------\r\n@angular-devkit/architect 0.900.6\r\n@angular-devkit/build-angular 0.900.6\r\n@angular-devkit/build-ng-packagr 0.900.6\r\n@angular-devkit/build-optimizer 0.900.6\r\n@angular-devkit/build-webpack 0.900.6\r\n@angular-devkit/core 9.0.7\r\n@angular-devkit/schematics 9.0.7\r\n@angular/cdk 9.1.2\r\n@angular/cli 9.0.6\r\n@angular/material 9.1.2\r\n@ngtools/webpack 9.0.6\r\n@schematics/angular 9.0.6\r\n@schematics/update 0.900.6\r\nng-packagr 9.0.3\r\nrxjs 6.5.4\r\ntypescript 3.7.5\r\nwebpack 4.41.2\r\n\u003c/code>\u003c/pre>\r\n","author":{"url":"https://github.com/fkolar","@type":"Person","name":"fkolar"},"datePublished":"2020-03-21T17:53:20Z","url":"https://github.com/angular/angular/issues/36185"}
| 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:28d82f1d-0c25-53d0-ebe1-9356da182d67 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D4FE:1F7384:162F377:1D4EEE2:6B013176 |
| html-safe-nonce | 0c8c67903480a6af4376bae03fc485637136b59c342ba23e0cf95141dbe86504 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENEZFOjFGNzM4NDoxNjJGMzc3OjFENEVFRTI6NkIwMTMxNzYiLCJ2aXNpdG9yX2lkIjoiODc0NzM4NTIwODY0ODU3NzM5OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0b4f3943c12811fd516ddfd1d25b466240072d4ed4e5acf8b7861c173c0f4e37 |
| hovercard-subject-tag | issue:585547277 |
| 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/36185/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d771b10f9064e418c844076fc4fb59d5aed0f3cdf13a3f32904be1f8cf5bf5ca/angular/angular/issues/36185 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d771b10f9064e418c844076fc4fb59d5aed0f3cdf13a3f32904be1f8cf5bf5ca/angular/angular/issues/36185 |
| og:image:alt | 🐞 bug report Affected Package There is a similar problem #35536 and if I follow instructions from this issue it works as a workaround Is this a regression? Yes. NG8 has no problem compiling local l... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | fkolar |
| 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 | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width