modules[moduleId] is undefined error is unhelpful
See original GitHub issueDo 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:
- Created 6 years ago
- Reactions:14
- Comments:50 (8 by maintainers)
Top 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 >
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 Free
Top 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
I found a workaround thanks to @LukeOak :
optimization: { concatenateModules: false, providedExports: false, usedExports: false }
webpack 4.29.3
@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__);