-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[babel-relay-plugin] v4+ Uncaught TypeError: Cannot read property 'length' of undefined #635
Comments
@BerndWessels this has been fixed on master, and i believe the fix is also available in react-relay 0.5.0. It's important to upgrade react-relay and babel-relay-plugin together. |
Thank you @josephsavona , but it looks like that there is no Can you please publish it? Thank you |
@BerndWessels the issue is that you are using a newer plugin version (0.4.0) with an out of date version of react-relay, 0.4.0. Please upgrade react-relay to 0.5.0. |
@josephsavona I am already referencing
But that doesn't solve the problem. The problem must be with the |
Hmm, the fix might not have made it into the latest versions. We'll release 0.6.0 soon, which will address this. |
@josephsavona OK, thank you. I will wait for that then and let you know if that fixes it. I am still confused about if there needs to be a Thanks |
We do release the two packages in parallel, but the version numbers aren't identical. It could definitely reduce confusion if we kept the minor version numbers in sync, though. |
Hi @josephsavona |
Hello
I have a problem when upgrading from
babel-relay-plugin
0.3.0
to0.4.x
.With
0.3.0
everything works just fine but with0.4.x
I get this error in Chrome:Uncaught TypeError: Cannot read property 'length' of undefined
relay.0.4.0.js in line 5394
if (GraphQL.isQuery(node) && node.fragments.length === 0) {
The problem is that the
node
object does not have a fragments property.You can easily reproduce it yourself with my Git Repo.
To reproduce just change from
"babel-relay-plugin-loader": "^0.3.0"
to
"babel-relay-plugin-loader": "^0.4.0"
then run
npm install
then in one console run
npm run schema:serve
and in another console run
npm start
Now you will see the error in the Chrome DevTools.
Thank you
Bernd
The text was updated successfully, but these errors were encountered: