-
-
Notifications
You must be signed in to change notification settings - Fork 27k
Upgrading from react-script 3.3.1 to react-scripts 3.4.0 required changing setupProxy #8513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Your two examples are identical. Did you accidentally paste the same code twice? |
@partynikko oops I did ... edited. The original code I had to change used the default export off of the http-proxy-middleware ...
|
This has nothing to do with CRA but with Could it be that you probably upgraded that package and confused it with the update of |
https://create-react-app.dev/docs/proxying-api-requests-in-development/#configuring-the-proxy-manually is now wrong due to the breaking changes in I opened #8515 to fix. |
Not 100% sure why -- but after upgrading to react-scripts 3.4.0 it became necessary for me to change the way that I'm requiring the http proxy ...
The instructions from here -- https://create-react-app.dev/docs/proxying-api-requests-in-development/ -- fail with 'proxy is not a function'
I had to change this code (which was working before ...):
To this:
The text was updated successfully, but these errors were encountered: