Warnings received while building for production
See original GitHub issueBug, 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
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Treating warnings as errors because process.env.CI = true ...
When tried to integrate my application with Travis Ci, i got error as follows. It says like i have to change some env...
Read more >node.js build fails if warnings present - Atlassian Community
Build fails if any warnings present. Creating an optimized production build... Failed to compile. When process.env.CI = true, warnings are treated as failures....
Read more >Xcode 10.2 gives scary warnings with Intents.strings files
I got a response from DTS on this. They did some testing and found that Xcode 10.2 is in fact skipping some build...
Read more >How to let the warnings not fail the SharePoint Framework ...
Only during a PRODUCTION build, you would get the following output: Warnings and errors let the build process know something failed.
Read more >Silencing Specific Build Warnings - Dave DeLong
Lines printed during compilation that start with warning: become warnings, ... You can produce your own build warnings and errors.
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
Closing as it seems this is resolved by clearing out stale
node_modules
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.