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.

modules[moduleId] is undefined error is unhelpful

See original GitHub issue

Do you want to request a feature or report a bug? FEATURE - error reporting

What is the current behavior? The webpack produces errorneous client code which pops modules[moduleId] is undefined error.

If the current behavior is a bug, please provide the steps to reproduce. Not sure. No matter what causes this error it should be human readable.

What is the expected behavior? The error should report whicvh module was not found or why. If this is a feature request, what is motivation or use case for changing the behavior? Software should be debugable. Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:14
  • Comments:50 (8 by maintainers)

github_iconTop GitHub Comments

37reactions
aquinqcommented, Feb 13, 2019

I found a workaround thanks to @LukeOak :

optimization: { concatenateModules: false, providedExports: false, usedExports: false }

webpack 4.29.3

13reactions
runia1commented, May 31, 2018

@trollkotze were you able to figure this out? I have tracked my issue to the same like as yours: modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: modules[moduleId] is undefined
I faced same issue and found that in Karma.conf.js, I was using wrong configuration for "files" as module.exports = function (config) ...
Read more >
undefined is not an object (evaluating 'modules[moduleId].call ...
Coding example for the question undefined is not an object (evaluating 'modules[moduleId].call') on using vue-cli/vue-router with layout-file-Vue.js.
Read more >
Node.js v19.3.0 Documentation
Indicates the failure of an assertion. All errors thrown by the node:assert module will be instances of the AssertionError class. new assert.AssertionError( ...
Read more >
CodePen Embed - quotemachine React-Redux
'undefined' && typeof console.error === 'function') ... and that would be bad var withExtras = _extends({}, props); if (withRef) withExtras.ref = this.
Read more >
www.gfcmsu.edu/dentalclinic/styles/js/modules/form...
node_modules /core-js/internals/create-non-enumerable-property.js","webpack:///. ... the module function\n \t\tmodules[moduleId].call(module.exports, module, ...
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