-4

See image below. I assume it's because it's an hybrid app that it would push out errors twice but then again I could be wrong about that. Has anyone encountered this before?

Why are errors being printed twice?

Duplicate console errors

georgeawg
  • 48,608
  • 13
  • 72
  • 95
Edgar Quintero
  • 4,223
  • 2
  • 34
  • 37
  • Open up both `ProgramModule` and `GroupModule`, and check the `declarations` array, because the same component (`SpinLoaderComponent`) is being included in both, where it should only be in one – user184994 Aug 03 '18 at 19:53
  • Thanks, but the question is how to avoid duplicate console log error messages, errors get posted twice, no matter what the error is. Makes reading errors hard to read. – Edgar Quintero Aug 03 '18 at 19:55

1 Answers1

0

Check your window.webpackJsonp to see if it contains multiples of your node_modules. If it does then this would suggest that it's including the modules twice and so calling the same methods that output to the console.

  • I don't seem to have that file in my project. I have a `webpack.config.js` – Edgar Quintero Aug 04 '18 at 00:32
  • In your browser debug console. This would be a property of the window object, not a file. – captwebdesign Aug 04 '18 at 00:37
  • Hey, sry for the late reply but I cannot find this, could you perhaps post a screenshot image with an example? – Edgar Quintero Aug 07 '18 at 14:27
  • Steps: 1. `ng new test-app` 2. `ng serve --open` 3. Open your web brewer's inspector/console and type `console.log(window.webpackJsonp);` press enter. Result: Should be an object with some Arrays. Notes: This is if you have a fresh install of angular-cli and `ng new` is functioning as it would by default. – captwebdesign Aug 07 '18 at 19:19