Skip to content

[BUG]: DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated #175

Description

@marcoandre1

Describe the bug
I noticed that there is a quick warning when launching the app with npm start :

> react-scripts start

(node:26108) [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:26108) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.

To Reproduce
Steps to reproduce the behavior:

  1. Start local server with npm start

Expected behavior
No warnings.

Additional context
There is an issue opened on the main create-react-app repo : DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated #12035. The fix is specified in pull request : fix(webpackDevServer): fix deprecation warning #11862. However, I can't make the fix without ejecting, which I don't want to do. I will keep an eye if it ever gets fixed. At the moment, it doesn't affect npm build.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdependenciesPull requests that update a dependency filewontfixThis will not be worked on

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions