-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Error: RelayParser: Encountered duplicate defintitions for one or more documents #17811
Comments
Oh and if this ends up being a fix in Relay, I'm happy to help drive that. |
This is windows, right? Probably it will work if you do cd E:\ (capital letter) instead of cd e:\ |
@waltercruz Yes, it's Windows, and the steps you pointed out are the remedy that got me off the ground. That said, it's still a bug, it's a regression from earlier this year, and, if I may, in 2019 OS-dependent path casing is not a battle I (or the non-trivial number of other users who are running into this, judging from Google results) should still have to fight, if we can avoid it. |
I wish that this was the case, but Mac OS Filesystem and Windows handling of casing doesn't make things easy, and when you have situations where your develop on a OS and deploys in another, things get even weirder.
There is - true-case-path, and gatsby it's already using it. But even with it, things aren't that easy. I solved a issue that prevented gatsby from running on a shared host - and even if it seems strange, it's all about casing on different OS. I could try to fix #17811 that, but it's gonna take some time as I don't have access to any windows machine. I'm pretty sure that your test repository will work fine on Linux or mac machines (can try on both tomorrow) BTW, windows cmd seems really weird. Check this comment on true-case-path. |
Hey guys, I am having a similar issue: ERROR #85901 GRAPHQL There was an error in your GraphQL query: Error: RelayParser: Encountered duplicate defintitions for one or more documents: each document must have a unique name. Duplicated documents:
has anyone come up with a solution? this happened very randomly.. I literally when to eat after taking a break.. and when I when to bring my website up "npm run develop" it started to act out. |
@Madgeniusblink , provided you're on Windows, make sure that your current path as shown on the command line has an uppercase drive letter. |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open! As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing! Thanks for being a part of the Gatsby community! 💪💜 |
Hey again! It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing! Thanks again for being part of the Gatsby community! |
Description
Same issue as #11688; creating new issue since the previous one was marked as fixed with an attached code change.
Any Gatsby site can fail to build with the following error provided you're building on Windows and your CWD path is using a lower-case drive name:
Steps to reproduce
Create a root directory for a new Gatsby site (e.g.
e:\repos\grumpyv2
) and make sure the Windows terminal shows the current path with a lower-case drive letter (clown around with something likecd /d e:\repos
from a different drive letter to make sure it really is lowercase).Clone my sample repo from https://github.com/rgiese/gatsby_issue17811, or just create a new Gatsby site that has a GraphQL query in one of its pages, e.g.
gatsby new gatsby-starter-blog-mdx https://github.com/hagnerd/gatsby-starter-blog-mdx
(which is all my sample repo is).gatsby build
Expected result
The site builds.
Actual result
Environment
Thoughts on fixes
We should be able to just make this go away - someone's got to be using a non-Windows-enlightened path manipulation library somewhere.
Barring that, at least raise a more useful error message. This wasted three hours of my life yesterday and it's a pretty popular issue judging from Google (even since February when we last tried to fix it).
The text was updated successfully, but these errors were encountered: