[V4] Message formatting is incompatible with Webpack v5
See original GitHub issueTypeError: message.split is not a function
error occurs when webpack throws any error during compilation
Seems like this line should check if message
is an object with and message
key, as webpack v5 mentions in migration guide:
Stats json errors and warnings no longer contain strings but objects with information splitted into properties.
MIGRATION: Access the information on the properties. i. e. message
Environment
webpack: “5.2.0” react-dev-utils: “11.0.0”
Issue Analytics
- State:
- Created 3 years ago
- Reactions:53
- Comments:15
Top Results From Across the Web
To v5 from v4 - webpack
To v5 from v4. This guide aims to help you migrating to webpack 5 when using webpack directly. If you are using a...
Read more >Upgrade to Webpack 5 failing - node.js - Stack Overflow
I am attempting upgrade to Webpack 4 to Webpack 5. ... Point sourcemap entries to original disk location (format as URL on Windows) ......
Read more >Upgrade Guide (v4 -> v5) | Format.JS
Using FormattedMessage without a intl context will fail fast. Why are we doing those changes?. Rich text formatting callback function is no longer...
Read more >ts-loader - npm
TypeScript loader for webpack. Latest version: 9.4.2, last published: a month ago. Start using ts-loader in your project by running `npm i ...
Read more >How to fix the build error of "Error in plugin "webpack-stream" "?
「atl」: Checking finished with 2 errors [21:15:05] 'buildMin' errored after 5.33 s [21:15:05] Error in plugin "webpack-stream" Message: ...
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 FreeTop 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
Top GitHub Comments
For those waiting for the fix to be accepted, you can use a
postinstall
script like this:tools/postinstall.js
:and on you
package.json
, add this to thescripts
section:@Lyfme you shouldn’t change the module code. Instead, change the input format:
From:
To:
The
formatWebpackMessages
plugin, according to this link, expects an object with 2 props, thus you can push these directly with the expected format.Hope that helps.