Angular 9 build failed
See original GitHub issueBug Report
What is the expected behavior?
$ ng update
$ ng build
[2]
[2] Compiling @angular/material/button : es2015 as esm2015
[2]
[2] Compiling @angular/cdk/layout : es2015 as esm2015
[2]
[2] Compiling @angular/material/snack-bar : es2015 as esm2015
[2]
[2] Compiling @angular/material/dialog : es2015 as esm2015
[2]
[2] Compiling @angular/flex-layout/core : es2015 as esm2015
[2]
[2] Compiling @angular/flex-layout/extended : es2015 as esm2015
[2]
[2] Compiling @angular/flex-layout/flex : es2015 as esm2015
[2]
[2] Compiling @angular/flex-layout/grid : es2015 as esm2015
[2]
[2] ERROR in Failed to compile entry-point @angular/flex-layout (es2015 as esm2015) due to compilation errors:
[2] ../../../../cloud-user/ui-packages/node_modules/@angular/flex-layout/flex/typings/module.d.ts:6:22 - error NG6002: Appears in the NgModule.imports of FlexLayoutModule, but could not be resolved to an NgModule class
[2]
[2] 6 export declare class FlexModule {
[2] ~~~~~~~~~~
[2] ../../../../cloud-user/ui-packages/node_modules/@angular/flex-layout/extended/typings/module.d.ts:6:22 - error NG6002: Appears in the NgModule.imports of FlexLayoutModule, but could not be resolved to an NgModule class
[2]
[2] 6 export declare class ExtendedModule {
[2] ~~~~~~~~~~~~~~
[2] ../../../../cloud-user/ui-packages/node_modules/@angular/flex-layout/grid/typings/module.d.ts:6:22 - error NG6002: Appears in the NgModule.imports of FlexLayoutModule, but could not be resolved to an NgModule class
[2]
[2] 6 export declare class GridModule {
[2] ~~~~~~~~~~
[2] ../../../../cloud-user/ui-packages/node_modules/@angular/flex-layout/flex/typings/module.d.ts:6:22 - error NG6003: Appears in the NgModule.exports of FlexLayoutModule, but could not be resolved to an NgModule, Component, Directive, or Pipe class
[2]
[2] 6 export declare class FlexModule {
[2] ~~~~~~~~~~
[2] ../../../../cloud-user/ui-packages/node_modules/@angular/flex-layout/extended/typings/module.d.ts:6:22 - error NG6003: Appears in the NgModule.exports of FlexLayoutModule, but could not be resolved to an NgModule, Component, Directive, or Pipe class
[2]
[2] 6 export declare class ExtendedModule {
[2] ~~~~~~~~~~~~~~
[2] ../../../../cloud-user/ui-packages/node_modules/@angular/flex-layout/grid/typings/module.d.ts:6:22 - error NG6003: Appears in the NgModule.exports of FlexLayoutModule, but could not be resolved to an NgModule, Component, Directive, or Pipe class
[2]
[2] 6 export declare class GridModule {
[2] ~~~~~~~~~~
[2]
[2] error Command failed with exit code 1.
[2] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[2] yarn build.test exited with code 1
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:12 (3 by maintainers)
Top Results From Across the Web
Angular 9 application build fails when working with linked ...
Make changes in the library. After library build succeeds, copy dist/my-lib and paste it in the application's node_modules folder(this triggers ...
Read more >Identify and Fix Build and Deployment Errors in Your Angular ...
In this guide, you will learn how to spot some of the most common build and deployment errors and how to resolve them...
Read more >Build failure - angular-bootstrap-md index.ts is not part of
ERROR in ./node_modules/angular-bootstrap-md/index.ts Module build failed: Error: C:projectsangular-examplenode_modulesangular-bootstrap-mdindex.ts is not ...
Read more >error: failed to initialize angular compilation - ngcc failed.
As misha130 suggested in the comments, there was (a single) library not aligned with the latest Ivy changes which was causing the error....
Read more >ng build - Angular
Option Description Value Type Default Value
‑‑aot Build using Ahead of Time compilation. boolean true
‑‑base‑href Base url for the application being built. string
‑‑delete‑output‑path Delete...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi , I also faced the similar issue but I updated the flex-layout component (npm install @angular/flex-layout@latest --save) and served it again ,it worked for me . My angular version and flex-layout version is as below “@angular/animations”: “^9.0.7”, “@angular/cdk”: “^9.2.0”, “@angular/common”: “~9.0.3”, “@angular/compiler”: “~9.0.3”, “@angular/core”: “~9.0.3”, “@angular/flex-layout”: “^9.0.0-beta.29”,
@CaerusKaru I
/dist
) folder in my project and in my libraryIt looks like Angular changed the error message slightly but it’s just a more verbose version of the same thing:
Flex layout is a peer dependency in my library along with all the other common angular dependencies. I can try putting together a reproduction repo if that would be helpful?