Skip to content
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

PokemonCard.js?e9b4:37 Uncaught TypeError: Cannot read property 'fragments' of undefined #4

Open
peturk opened this issue Jan 10, 2017 · 4 comments
Assignees

Comments

@peturk
Copy link

peturk commented Jan 10, 2017

Exercise-04

I'm trying to apply these methods to my project, but I have not modified the files at all, just added the dependencies needed, exercise 1-3 worked fine.

I get a error in google devtools:
PokemonCard.js?e9b4:37 Uncaught TypeError: Cannot read property 'fragments' of undefined
line 37 it says:
pokemon: propType(PokemonCard.fragments.pokemon).isRequired,

"save me"

@marktani
Copy link
Collaborator

marktani commented Jan 10, 2017

Thanks for the report 😛

I think this is related to this topic: learnapollo/learnapollo#29
What browser are you using?

@marktani marktani self-assigned this Jan 10, 2017
@peturk
Copy link
Author

peturk commented Jan 10, 2017

Oh yes, I should have mentioned I tried:
npm install --save-dev babel-plugin-transform-class-properties
Which I found here:
https://babeljs.io/docs/plugins/transform-class-properties/
but that did not fix the problem 😞

edit: I just noticed I did not put it in any config, looking into that now 👍

@marktani
Copy link
Collaborator

Cool, then this is related to using static properties instead of export const which I used that for the RN track

Would be great if you can create a PR 🙂

@peturk
Copy link
Author

peturk commented Jan 10, 2017

I shared with you, files are in web/static/js/components
Can't seem to make it work with the fragments so I commented them out in PokemonCard and PokemonCardHeader
web/static/js/index.jsx is where I ApolloProvider is located 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants