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.

Module ID conflict on first dev server compilation

See original GitHub issue

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

We upgraded all our webpack dependencies (core, dev server and loaders) to their latest versions and started to see modules conflicts on the first compilation using webpack-dev-server:

/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_desktop_common_img_vendor_logos_songkick_svg__ = __webpack_require__(/*! desktop/common/img/vendor-logos/songkick.svg */ 23);
// ... elsewhere
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_desktop_common_js_views_v3_components_core_buttons_Link__ = __webpack_require__(/*! desktop/common/js/views/v3/components/core/buttons/Link */ 23);

These 🔼 are from the same bundle file and they’re referencing the same module ID. The module source for 23 contains the SVG module source, leaving the Link module not present at all in the bundle.

If we change a file and let webpack-dev-server recompile to get the changes, then the bundle correctly contains both the SVG module and the Link module.

This issue is not present when just building the assets with webpack directly.

We tried to downgrade webpack-dev-server back to 2.4.2, but the issue is still presenting itself, so I opened the bug here, since it seems to be a core webpack issue.

If the current behavior is a bug, please provide the steps to reproduce.

Unfortunately, any attempts on providing a smaller test case to reproduce this were not possible.

What is the expected behavior?

No module conflicts in the bundle output.

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System. Node v8.1.2 webpack 3.5.5 webpack-dev-server 2.7.1 Ubuntu 16.04

Upgraded from the following (which did not present this issue): webpack 2.3.2 webpack-dev-server 2.4.2

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
avalycommented, Sep 18, 2017
0reactions
joaovieiracommented, Sep 13, 2017

Still unable to understand the source of the problem as well, I’ve added my tiny test case on https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/612#issuecomment-329028865

Read more comments on GitHub >

github_iconTop Results From Across the Web

Module ID conflict on first dev server compilation #612 - GitHub
The latest version of extract-text-webpack-plugin triggers a weird bug in a webpack bundle where multiple modules share the same module ID.
Read more >
How I solved and debugged my Webpack issue through trial ...
When webpack bundles your source code, it can become difficult to track down errors and warnings to their original location.
Read more >
Conflict: Multiple assets emit to the same filename
First of all, on your output , you are specifying the filename to app.js which makes sense for me that the output will...
Read more >
Output - webpack
[id], The module identifier. [loaders], Explicit loaders and params up to the name of the first loader. [resource], The path used to resolve...
Read more >
mod_ssl - Apache HTTP Server Version 2.4
This module provides SSL v3 and TLS v1.x support for the Apache HTTP ... Description: Server PEM-encoded X.509 certificate data file or token...
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