relay icon indicating copy to clipboard operation
relay copied to clipboard

Problem with configuration

Open lukejagodzinski opened this issue 10 years ago • 5 comments

Hi, I'm trying to configure Relay for around one week and without success. I'm already frustrated. As I solve one problem another one emerges. It looks like it will never end. I don't know what I'm doing wrong but right now I'm stuck with the following error:

Uncaught Invariant Violation: RelayQL: Unexpected invocation at runtime. Either the Babel transform was not set up, or it failed to identify this call site. Make sure it is being used verbatim as `Relay.QL`.

From what I know it's probable somehow related with babel-relay-plugin but everything seems to be configure properly. Here is very minimal repository https://github.com/usefulio/nextgen

Don't look at the server directory as it stopped working when I've change directories structure. The most important parts are webpack.config.js, packages.json, plugins/babelRelayPlugin.js and client directory. Can any one tell me what's wrong? Is there any good tutorial from start to end on how to work with webpack, babel and relay?

lukejagodzinski avatar Aug 23 '16 22:08 lukejagodzinski

Can check with the below course on Pluralsight its helpful

https://www.pluralsight.com/courses/react-apps-with-relay-graphql-flux

shashwattt-Pretlist avatar Aug 24 '16 05:08 shashwattt-Pretlist

I was getting this error. I found a workaround. Instead of following the example .babelrc provided in relay-starter-kit which is

{
  "passPerPreset": true,
  "presets": [
    {
      "plugins": [
        "./build/babelRelayPlugin"
      ]
    },
    "react",
    "es2015",
    "stage-0"
  ]
}

I changed .babelrc to

{
"passPerPreset": true,
"plugins": [
"./build/babelRelayPlugin"
],
  "presets": [
    "react",
    "es2015",
    "stage-0"
  ]
}

This worked for me. I have not yet found the cause of the issue though.

saintsjd avatar Sep 21 '16 03:09 saintsjd

(Spring cleaning.) I'm going through old issues cleaning out things that haven't had any activity in a while and it looks like this one has a workaround posted above, so I'm going to close it. For future reference, I'd recommend posting questions like this on a purpose-built Q&A forum like Stack Overflow, where you are more likely to get a timely response (and where others will be more likely to find the answer too and benefit from it). If you do post there in the future, please share a link to your Stack Overflow question here, to so that others stumbling across this can find it.

wincent avatar Jan 31 '17 01:01 wincent

Sorry for not closing issue. In deed I've solved that problem, don't remember how.

lukejagodzinski avatar Jan 31 '17 08:01 lukejagodzinski

Github pro tip: You can see your all issues you created here: https://github.com/issues

yasserkaddour avatar Jan 31 '17 09:01 yasserkaddour