New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
modules[moduleId] is undefined error is unhelpful #5429
Comments
I'm debugging the same issue. I'll share results. |
Sounds like the same error I've got. Is |
Could you please add webpack version, and if possible provide a reproducible repo that we can add to our tests and debug? |
I have the same problem, unfortunately not reliably reproducable - mostly the produced code runs fine but sometimes I get the Webpack: 3.10.0 If it helps, I'm running webpack with Angular CLI 1.6.5. |
I have a similar problem with Webpack 3.8.1 and Angular/cli 1.5.3: it is only when running in Chrome's private mode. I mean my Angular app works well except in Chrome's private mode, in which it encounters an error saying "module[moduleId] is undefined". But I don't know why by checking the error context. So it'd be nice to have something more. |
Same problem here, using webpack 3.10 (@angular/cli 1.53) and 3.11 (@angular/cli 1.7.2). Looking at the culprit,
The last line there. |
Hello, |
@trollkotze were you able to figure this out? I have tracked my issue to the same like as yours: |
I have the same issue by in IE. There is no problem in another browsers. A few days ago everything was work fine. |
Having this issue in Safari. |
@runia1 Sorry, I'm only reading this now. Seems I have disabled live recompling on source file change as well. (Or it has disabled itself?) Maybe has something to do with that. |
Was this ever resolved. Having similar problems now, on all browsers except Firefox mostly. HAPPENED just after implementing LAZY LOADING I suspect. Runtime Error ETC, ETC... |
I also do see this happening in the latest webpack 4.26. Is there a way to track this error down to thrash it? |
Same here, webpack 4.22.0, breaks on this line:
Lazy loading is used within the project. Is there a workaround or a fix for this nasty error? |
@webthegap I am also facing same issue with lazing loading of modules. String path throws error 'Cannot find 'xxxModule' in './../xxx/xxx.module' ' Any update on this ? Its breaking in IE 11 |
I'm currently enjoying this, only on hot reload. What's happening is that in the webpack bootstrap, Webpack 4.28.4 |
Hey there, I run into the similar problem with this line webpack: 4.28.2 |
Having the same issue with Next.js and React while running the project in dev mode with hot reload enabled. The page load fails at 1st try but on reload it works, at least on Chrome. In Safari it keeps happening. Webpack version: 4.25.1 |
Yes. I get this error |
It's happening also with me, only with Firefox. Using Angular, happened to me after inserted
on my modules. Also, it's only happening in minified version (which I send to production), in the local version (which I keep unminified) it's not happening. |
I found a workaround thanks to @lukeoak :
webpack 4.29.3 |
Is this a bug? |
This is a bug that may/ may not be reproduced. Refreshing the browser page solved the problem for me. |
I am facing this bug in my Angular App and found out that the problem is with the version of I removed the caret(^) and now it works fine. I believe there is a bug in the recent version of |
I ran into this problem and ran |
I've run into a similar stack trace as this one.
Environment:
We use a mix of server side rendered pages, single page applications, and code chunking in order to enhance the user experience on our application. This particular stack trace occurs when @loadable/component thinks the module is loaded by checking if it exists in After a quick search through documentation, and looking through our compiled code, there doesn't seem to be a way to check if the chunks for a module are finished loading. Webpack keeps track of this in an object called Has anyone else seen this or solved it some way? EDITI found a bit of time and created a repro application at: https://github.com/ColinxLLC/webpack-undefined-chunk-repro Notably, in my case this is not webpack's fault. However, after a bunch of searching around there doesn't seem to be a webpack sanctioned method to synchronously figure out if a module and its required chunks are finished downloading/loaded. I'm also actively discussing this issue on: gregberge/loadable-components#400 |
Had same issue in Firefox only. Sometimes on refresh it would get a little further and then die on I'd been running Firefox for like 2 months and apparently it was having issues loading the entire vender webpack file into memory. So I just restarted it and it started working. |
I managed to fix this error by ensuring I had a chunkFilename set in the output part of my webpackConfig:
After this instead of 0.js, 1.js, 2.js etc I had file names like d30cb23bb92d1f95b9c6.js and this error went away. |
still I have this error in Firefox browser and Chrome! |
webpack: 5.1.0
also, I'm using the code spliting but i have the same error when I add :
|
quick fix (dirty fix) : everything works well with: |
@tdetugny please try to latest version, if it is not help, create reproducible test repo, thanks |
it works fine with the last webpack version 5.1.3. Thanks a lot @evilebottnawi @sokra for your fix 👍 |
This works for me in a Vue.js project, if you are working on a Vue.js project and have this problem in Safari / Firefox, create a vue.config.js file in the root, put these in the file, and save, run serve command again, your Safari and Firefox shouldn't show the same error again. |
Still occurs for me with webpack 5.1.3 unfortunately. |
Please open a new issue with a repro repo |
I faced this error when i tried to use mini-css-extract-plugin. Getting back to style-loader bundled it correctly. I dont think it is a bug. It looks like some sort of webpack configuration causes this issue. |
I want to close this issue due a lot of different reported problems (and it was fixed), anyway if you faced with this bug again please open a new issue, thanks |
I had similar issue |
@qkreltms Please update |
I too have this issue with |
@karlvr Please create reproducible test repo |
A note here, users of Safari browsers might run into this issue, If you have, try first to reproduce in google chrome or firefox. This can be due to Safari caching too much. To fix the cache (if it works in chrome) use: CMD+ALT+E followed by a refresh CMD+R. |
@haringsrob ah thanks, this fixed my problem. It worked in safari private. |
This is a good solution. |
Just incase this helps anyone, my use case is an Apollo GraphQL server running on NodeJS v14. Docker file base is @aquinq comment from 2019 is still a relevant fix
|
Hey guys! what as for webpack 3.8.1? does anybody fixed it. when using optimization: { concatenateModules: false } configuration getting warning "Warning: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
|
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.
The text was updated successfully, but these errors were encountered: