Skip to content

Commit bf31f6a

Browse files
docs: troubleshooting tips on Cannot read properties
1 parent cc4785f commit bf31f6a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/content/migrate/5.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ contributors:
1313
- getsnoopy
1414
- yevhen-logosha
1515
- akash-kumar-dev
16+
- EvanSanderson
1617
---
1718

1819
This guide aims to help you migrating to webpack 5 when using webpack directly. If you are using a higher level tool to run webpack, please refer to the tool for migration instructions.
@@ -292,6 +293,10 @@ Repeat the following steps until you solved at least level 3 or 4:
292293
- 404 errors pointing to URLs containing `auto`
293294
- Not all ecosystem tooling is ready for the new default automatic `publicPath` via `output.publicPath: "auto"`
294295
- Use a static `output.publicPath: ""` instead.
296+
- Cannot read properties of undefined (reading 'call')
297+
- If you see this error during runtime, it may be related to the [ModuleConcatenationPlugin](https://webpack.js.org/plugins/module-concatenation-plugin/). Check if you are using the plugin, and if you've included it in the `plugins` sections of a config, and that config is also set to `production` mode, remove the plugin (ie `new webpack.optimize.ModuleConcatenationPlugin()`) from your plugins list. In webpack 5, the plugin is enabled by default in production mode, and it may get included twice.
298+
- In general, disabling each plugin and testing the build is a good way to triage where the issue might be coming from.
299+
- See: [this issue](https://github.com/webpack/webpack/discussions/15369#discussioncomment-13420496) for more details.
295300
296301
- Level 6: **Deprecation Warnings**.
297302

0 commit comments

Comments
 (0)