-
Notifications
You must be signed in to change notification settings - Fork 178
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
parse is not a function #155
Comments
@lfernando-silva we establish graphql-js as a peerDependency. can you make sure that's installed? |
I have the same issue on a fresh new create-react-app. |
Ok, I found the issue: does not work with the latest |
Are you sure it's |
Just had the same issue, but downgrading back to 0.13.0 solved it. Thanks @DogPawHat! |
Working setup for me (Typescript) is same as above, with |
For me, as @sznrbrt and @DogPawHat said, downgrading the graphql version to 0.13.0 works. Really, seems it's a problem with graphql module. Thank you guys |
Is there an open issue on the graphql repo for this? I'd like to know when I can go past 0.13.0 Thanks |
@sebkamil its at graphq-js/#1248. Still figuring it out it seems. |
i believe this is an issue upstream. see graphql/graphql-js#1248. closing for now! |
Will have to take a closer look at importing GraphQL-js at 0.13 and 14.0 |
I would like to confirm that upgrading the
Reference: graphql/graphql-js#1248 . |
@datlife I've been using react-scripts v1.1.2 but still getting the same type of error:
Downgrading to graphql v0.13.0 is still the only successful workaround for me so far. |
I can confirm this is still an issue with |
For anyone else out there reaching this from Google, this is still an issue with |
This seems to be the answer to the problem. For me at least. graphql/graphql-js#1248 (comment) It had to do with webpack resolving |
Suggestion from @donovanhiland works for me too. For people like me coming to this from Google I had ejected from create-react-app and in
to
in both files and this fixed it for me. I'm using the ReasonReact scripts, so your config probably looks a bit different, but what is important is the .mjs comes after .js |
@wtfleming webpack extensions change for |
My versions of graphql and graphql-tag never changed.
Same issue, work fine before updating yarn.lock
after updating yarn.lock |
this seems like an issue with please re-open if you're having this issue with |
Not sure why, but Webpack is causing errors after upgrading to the latest graphql. Switching the order of JS loading fixes the issue. Credit to: apollographql/graphql-tag#155 (comment)
I'm using react-static which has its own webpack config, so the suggested workaround for create-react-apps (resolving Put it in a # Remove all .mjs files from graphql:
find node_modules/graphql -type f -name *.mjs | xargs rm |
I'am getting error at query declaration.
index.js:128 Uncaught TypeError: parse is not a function
Debugging, I realized the method parse at
node_modules/graphql-tag/src/index.js
is really undefined:This is my code. I'm using create-react-app (v 1.5.1) and already tried to rewire. Also didn't work with the example query.
The query can be parsed well at AST explorer.
Can anyone help me?
The text was updated successfully, but these errors were encountered: