question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warnings received while building for production

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
josephperrottcommented, Nov 26, 2018

Closing as it seems this is resolved by clearing out stale node_modules

0reactions
angular-automatic-lock-bot[bot]commented, Sep 11, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found