question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi, is it possible to use Relay with create-react-app without ejecting project and messing with webpack configuration?

I get the following error in the console:

invariant.js:38 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`.

I was looking for solution and it seems to be problem with lack of Relay.QL transpiler in the Babel configuration. But all these projects were not created with create-react-app cli. From what I know it’s not possible to mess with webpack configuration until I eject a project.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:10
  • Comments:53 (12 by maintainers)

github_iconTop GitHub Comments

75reactions
gaearoncommented, Aug 18, 2016

We could detect if you have relay in package.json and add its Babel plugin. Since it’s part of the Facebook stack it makes sense to me to provide an integrated experience (as long as it works great).

11reactions
lackercommented, Mar 15, 2017

There are a bunch of people at Facebook interested in making create-react-app work more smoothly with Relay. The tricky thing right now is that there are a ton of improvements on Relay coming, and we’re not sure whether/how that will change the getting-started experience. So I think we should wait for the next big Relay release and then take another hard look at this and see how we can make the Relay <-> React experience better.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Use a Relay : 4 Steps - Instructables
The relay is an electrically operated switch, it acts like a soldier, accept low voltage signal commands for Arduino, and then control the...
Read more >
What is an Electrical Relay? - OMRON Electronic Components
Relay consists of a coil, which receives an electric signal and converts it to a mechanical action and contacts that open and close...
Read more >
Relay - Wikipedia
Relays are used where it is necessary to control a circuit by an independent low-power signal, or where several circuits must be controlled...
Read more >
What is a Relay and Why Are They So Important? - Amperite
Relays are electric switches that use electromagnetism to convert small electrical stimuli into larger currents. ... These conversions occur when ...
Read more >
What is a relay, its function, types and relay wiring - ElectGo
Relays are the switches that aim at closing and opening the circuits electronically as well as electromechanically. It controls the opening and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found