babel-plugin-react-relay icon indicating copy to clipboard operation
babel-plugin-react-relay copied to clipboard

POST body sent invalid JSON

Open 18601673727 opened this issue 9 years ago • 4 comments
trafficstars

I'm trying to integrate create-react-app and swapi, here's my code and I'm facing this issue:

$ npm start

Failed to compile.

Error in ./src/index.js
Module build failed: Error: Bad Request: {"errors":[{"message":"POST body sent invalid JSON."}]}
    at Array.map (native)
 @ multi main

Please help, thanks!

18601673727 avatar Oct 08 '16 18:10 18601673727

I couldn't find any valid configuration in your shared code @18601673727. Have you tried out any of the available configuration options?

schickling avatar Oct 08 '16 22:10 schickling

@schickling Thanks for the quick reply, well I added a .graphqlrc and got new error like below:

Failed to compile.

Error in ./src/index.js
Module build failed: Error: Bad Request: {"errors":[{"message":"Cannot query field \"locations\" on type \"__Directive\".","locations":[{"line":13,"column":9}]}]}
    at Array.map (native)
 @ multi main

18601673727 avatar Oct 09 '16 11:10 18601673727

@18601673727 I worry create-react-app is not yet compatible with Relay: https://github.com/facebookincubator/create-react-app/issues/462

schickling avatar Oct 09 '16 11:10 schickling

@help

{ "errors": [ { "message": "Cannot query field "locations" on type "__Directive".", "locations": [ { "line": 13, "column": 9 } ] } ] }

randa12 avatar Sep 14 '17 09:09 randa12