-
Notifications
You must be signed in to change notification settings - Fork 27
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
Cannot read property 'call' of undefined #77
Comments
Please, can you try with https://github.com/globalizejs/globalize/tree/master/examples/app-npm-webpack |
Thanks for the quick response. I tried that and it works but it uses |
Same as #73 I believe. |
Also getting this as well. Between this and some of the other issues in this repo, is this plugin still used by users of globalize? |
Experiencing this as well. Appears to be a regression introduced in v1.1.2. Will try to dig into it shortly. |
I'm seeing same issue with
After all that, node run build succeeds and creates /dist folder. However, navigating to localhost:8080/dist/index.html produces the following error:
|
I am also seeing this issue that @chuyler is seeing. |
I'm also running into this with Webpack 4. I've created a repo with a minimal project that causes this: https://github.com/jou/globalize-webpack-plugin-bug-77 |
I am getting the same error with with Chromium. With Firefox it is 'TypeError: e[n] is undefined* I also have made a configuration to dynamically switch locale which dynamically loads locale chunks. It works with webpack 3, but with webpack 4 i get 'modules[moduleId] is undefined' in development. In production it becomes 'e[t] is undefined', so i guess it is the same error and modules[moduleId] is more informative. * configuration in https://github.com/metaclass-nl/globalize/tree/app-npm-webpack4 |
With some debugging i found that modules[moduleId] is in a __webpack_require__ function which is defined in the webpackBootstrap section of i18n/en.<hash>.js. modules[moduleId] is undefined with call __webpack_require__(2). Actually only 65, 135, 143, 151 are available in this var modules, these are all defined in in the i18n/en.<hash>.js chunk itself. Module 2 is in vendor.<hash>.js which does not contain a __webpack_require__ function function but just adds its functions to window.webpackJsonp. Another __webpack_require__ function is defined in main.<hash>.js, but has a different implementation, it loops through window["webpackJsonp"] passing elements to webpackJsonpCallback who adds stuff to modules[moduleId], deferredModules and installedChunks. I wonder if i18n/en.<hash>.js should define its own __webpack_require__ function. Maybe if it just added its functions to window.webpackJsonp, __webpack_require__ from main.<hash>.js would be used and it would take care of adding everything to modules so modules[moduleId] would work. OTOH dynamic loading of aditional locale chunks would then not work i guess, so maybe the implementation of the webpackBootstrap section of each locale chunk should be there, but should be compatible with the one in main.<hash>.js. But if i take a look at the code of globalize webpack plugin i got no idea how all this could be related to what it does... |
I have the exact same problem. |
ran into the same Problem. as is see, the CommonsChunkPlugin is obsolete and should be replaced with optimization splitChunks. This is how my webpack config looks now: https://gist.github.com/Darth-Alex/181e6efe687d8f029d66672d8ede4414 |
For a workaround that uses skip-amd-webpack-plugin and cldr instead of the globalize-webpack-plugin, see https://github.com/metaclass-nl/switch-language-example-globalize |
I am trying to integrate Globalize via the this webpack plugin and am running into an
Cannot read property 'call' of undefined
error. It seems like this error happens with the latest version of webpack at least to my limited understanding. I cloned the example app from globalizejs/globalize and updated it here and am getting the same error. I'm not sure if this is a bug or if I've done something wrong. Any idea?The text was updated successfully, but these errors were encountered: