Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When I update react-dev-utils to the @next version. I can't find typescriptFormatter and WatchMissingNodeModulesPlugin

when updating webpack from 4 to 5, I got the error:

TypeError: message.split is not a function

which is thrown in react-dev-utils/formatWebpackMessages.js.

Then I update react-dev-utils to then @next version which fix this.

However in the @next version, there are no WatchMissingNodeModulesPlugin and typescriptFormatter in react-dev-utils, and they are used in my webpack.config.js file which is working with webpack4.

How can I fix this or do I need these two utils in my typescript project?

Can anyone give me a template of webpack.config.js for a typescript project using webpack5?

like image 871
fawinell Avatar asked Dec 06 '25 19:12

fawinell


1 Answers

I had this issue too.

They endedup removing WatchMissingNodeModulesPlugin for Webpack 5 so you have to remove its usage too. It will be a similar change to this PR: https://github.com/facebook/create-react-app/pull/11170/files

Similarly, typescriptFormatter was removed in this change: https://github.com/facebook/create-react-app/pull/10004
For this one you'll need to make the same changes to the webpack.config.js file.

like image 158
Mo Beigi Avatar answered Dec 10 '25 01:12

Mo Beigi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!