-
Notifications
You must be signed in to change notification settings - Fork 18
Missing fragments on Mac Os #69
Comments
Hi @Jfelix61, thank you for opening an issue! What is the version of gatsby, gatsby-transformer-sharp, and gatsby-plugin-ts/graphql-codegen of your project? Are they the same in both install? |
Hi @d4rekanguok, Versions:
|
Got it. To narrow down the cause of the issue, could you try cloning this reproduction repo? It uses the same versions as outlined above. I use sharp fragment in this file: I haven't been able to get the same error on MacOS & Ubuntu 16, perhaps it's something else.
|
Your repo runs without any problem 🤔.
|
This is tough, I'd need your help to reproduce this issue — your experience is valuable & I would love to sort this out, or at the very least add a warning to other users. |
Yes, I will try to debug it and see if I can find the cause. |
So I've been investigating and now get the error on Linux, Mac OS and Windows. Fortunately I've found a clue on where the problem lies. The fragments file is not being parsed by codegen plugin. When explicitly added to document path it returns that fragments does not contain graphql definitions. Edit: |
Thank you for sharing the issue, I will check it out -- it really should be able to find stuffs in node_modules, we might had overlooked something. |
It looks like the same problem at issue #82 |
It's possible, this issue is opened before graphql 15 was released though. This fragment issue is very finicky, I haven't been able to consistently address it yet :( |
Whenever I try to run graphql codegen on my mac, I get the following error:
It seems to work fine on Linux (running Pop!_os 19.10). I believe it has to be related to the differences in paths of Mac os. By the way, I have
gatsby-plugin-sharp
dep. which hosts the fragments.The text was updated successfully, but these errors were encountered: