Use of deprecated webpack DevServer onBeforeSetupMiddleware and onAfterSetupMiddleware options
See original GitHub issueSteps to reproduce
npx create-react-app my-app
cd my-app
npm start
Unexpected output
(node:22848) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:22848) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
My environment
- create-react-app 5.0.0
- node 16.13.1
- Windows 10
Issue Analytics
- State:
- Created 2 years ago
- Reactions:73
- Comments:16
Top Results From Across the Web
'onAfterSetupMiddleware' option is deprecated | bobbyhadz
To resolve the warning, update your configuration to use setupMiddlewares instead. dep webpack dev server on after setup middleware deprecationwarning. shell.
Read more >Cant load a react app after starting server - Stack Overflow
This is a deprecation warning, meaning that you need to start using the newly suggested way of configuring your middleware.
Read more >DevServer - webpack
DevServer. webpack-dev-server can be used to quickly develop an application. See the development guide to get started. This page describes the options that ......
Read more >React Tutorial #0.4 onAfterSetupMiddleware is Deprecated
React Tutorial #0.4 onAfterSetupMiddleware is Deprecated | onBeforeSetupMiddleware is Deprecated | Dr Vipin ClassesIn this tutorial, ...
Read more >onBeforeSetupMiddleware is Deprecated 문제 해결방법 - velog
(node:2584) DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use ...
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
react-scripts@4
is unnecessary at this point and likely not a good idea.react-scripts
to that version. No more warning, and you’re future-proofed!Actually, this breaks our app locally. It’s not just acting as a warning it’s acting as an error and preventing the dev server from running. We are using react-scripts 5.0.1 and the fix is still not implemented in that version. @holub008 any idea when 5.0.2 will be released?