Skip to content

Warnings received while building for production #13903

@kartikwatwani

Description

@kartikwatwani

Bug, feature request, or proposal:

After I updated to version 7 of angular material I am receiving warnings while building for production using the command ng build --prod --build-optimizer. The warnings in the terminal are shown below

WARNING in ./src/app/footer/footer.module.ngfactory.js
65:1033-1041 "export 'ɵd21' (imported as 'i14') was not found in '@angular/material/menu'

WARNING in ./src/app/footer/footer.module.ngfactory.js
65:1786-1823 "export 'MAT_STEPPER_INTL_PROVIDER_FACTORY' (imported as 'i22') was not found in '@angular/material/stepper'

WARNING in ./src/app/footer/footer.module.ngfactory.js
65:2777-2796 "export 'ScrollingModule' (imported as 'i30') was not found in '@angular/cdk/scrolling'

WARNING in ./src/app/footer/footer.module.ngfactory.js
65:2798-2817 "export 'ScrollingModule' (imported as 'i30') was not found in '@angular/cdk/scrolling'

WARNING in ./node_modules/@angular/material/menu/typings/index.ngfactory.js
69:152-159 "export 'ɵf21' (imported as 'i1') was not found in '@angular/material/menu'

WARNING in ./src/app/app.module.ngfactory.js
72:2825-2833 "export 'ɵd21' (imported as 'i16') was not found in '@angular/material/menu'

WARNING in ./src/app/app.module.ngfactory.js
72:3460-3497 "export 'MAT_STEPPER_INTL_PROVIDER_FACTORY' (imported as 'i22') was not found in '@angular/material/stepper'

WARNING in ./src/app/app.module.ngfactory.js
72:9860-9879 "export 'ScrollingModule' (imported as 'i41') was not found in '@angular/cdk/scrolling'

WARNING in ./src/app/app.module.ngfactory.js
72:9881-9900 "export 'ScrollingModule' (imported as 'i41') was not found in '@angular/cdk/scrolling'

WARNING in ./src/app/my-nav/my-nav.component.ngfactory.js
98:1417-1425 "export 'ɵf21' (imported as 'i12') was not found in '@angular/material/menu'

WARNING in ./src/app/my-nav/my-nav.component.ngfactory.js
98:940-960 "export 'MAT_ICON_LOCATION' (imported as 'i7') was not found in '@angular/material/icon'

and when I deploy distribution folder to server my app is not working on the domain. It is only working in development mode at localhost:4200

What is the expected behavior?

No warnings should be there.

What is the current behavior?

Warnings are shown after build is completed using ng build --prod --build-optimizer in the terminal and the app is not working when distribution files are uploaded to hosting provider

What are the steps to reproduce?

Upgrade from angular 6 to angular 7 using https://update.angular.io

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 7, angular material 7.0.2, typescript 3.1.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions