Skip to content

Commit

Permalink
Broken Proxy*
Browse files Browse the repository at this point in the history
//Just letting you know this proxy does not work anymore and I wondered if you had a fix? everytime I use it with current packages I get //this error "[1] When specified, "proxy" in package.json must be a string.
//[1] Instead, the type of "proxy" was "object".
//[1] Either remove "proxy" from package.json, or make it a string.
//"
  • Loading branch information
joshuaaguilar20 authored Nov 24, 2018
1 parent da3cbbc commit 05bb635
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@
"eject": "react-scripts eject"
}
}
//[1] When specified, "proxy" in package.json must be a string.
//[1] Instead, the type of "proxy" was "object".
//[1] Either remove "proxy" from package.json, or make it a string. Need Fix?

2 comments on commit 05bb635

@subhokarmakar
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, React don't support it anymore. You need to setup a middleware now to proxify your calls.

Visit: https://facebook.github.io/create-react-app/docs/proxying-api-requests-in-development#configuring-the-proxy-manually

@subhokarmakar
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, reply if you need any help on this issue.

Please sign in to comment.