-
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 #11688
Comments
This is defenitely a bug in gatsby. For now you can workaround this by changing line in https://github.com/ChildishhAlbino/childishhalbino.github.io/blob/problem-fixing/gatsby-node.js#L34
(I adjusted file/directory names casing to match one that exists in repository). It will get you pass that graphql error, but there will be some additional fixes needed elsewhere too because I hit:
But this is not really related to issue itself. I will start working on fix to handle casing differences and to not throw this confusing error message. |
Thanks for working that out for me! I actually didn't think it was a bug in Gatsby but whaddya know? ] Quickly worked out those errors and the sites working again! Thanks heaps :D Have a nice day, good luck fixing the bug! |
i think I'm having a similar issue, any update on a fix for this? |
@imshuffling hopefully I'll open PR today. Just to confirm if your issue have similar root problem - are you on Mac? Because it seems that on Linux and Windows when you use wrong casing for |
Oh, this seems different. Error from this is: |
I'm encountering the same bug as well when I create a new gatsby project using this starter and run My error message:
I'm also on mac.
|
@AlexanderProd From quick look it seems like same issue. This is because
so as a workaround, adjusting path in |
I've noticed when I change it to a small |
i have same problem |
I met the same error. |
This solved it for me. Thanks. I did not have this issue on mac. |
Additional info if anyone else stumble on this issue on Windows: The gatsby npm run script is case-sensitive not only with the src file names, but including the entire path name: I store all my projects in a folder in D: named Dev, (D:\Dev) I had to rename the Dev folder to lowercase just to fix it. |
Gatsby should really add a warning to any Windows users about having capital letters in their dir names. This must stump quite a few users. |
works for me too, thank you! |
This error can be quite vague for starters but it is actually a warning due to the case sensitive nature of gatsby run scripts. For example: avoid this |
Thanks @patrick-wc ! It did stump me! |
On Windows 10 using git bash, i was getting these errors/warnings because I had typed I quit code, and did And it all just worked... |
This started happening to me, seemingly out of nowhere. Exiting out of the command line and reentering seemed to do the trick |
This is still happening using Git Bash in VSCode terminal on Windows. Git Bash by itself works fine. |
Fixed it for me as well. Used Windows PowerShell and worked when I typed |
wow i just randomly started having the same error. played around with different content folders for like half an hour before I realized that definitely wasn't it. after renaming my project folder it's working 100% now instantly. |
I have found that explicitly typing out |
This is still occurring when I run |
For me the error was introduced when I duplicated a |
I had this same issue with when I was having the below code in 2 pages
to avoid this I changed contentFulAddBlogPost to allContentFulAddBlogPost in one of the components as below
worked like a charm. hope it helps you guys in the future :) |
Description
Building a blog / portfolio with GatsbyJS and I'm struggling with this issue. I had the website working for the most part but all of a sudden it's stopped working. Really not sure why. The error doesn't make much sense to me. Hoping someone cold help me work out why.
Steps to reproduce
https://github.com/ChildishhAlbino/childishhalbino.github.io/tree/problem-fixing
Above is a git repo with the project as I last left it.
An error screen should appear with the above error.
Expected result
There will be warnings. There are some imports that aren't being used but aside from that everything should be fine.
Actual result
Environment
Run
npx gatsby info --clipboard
in your project directory and paste the output here.System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz
Binaries:
npm: 6.4.1 - D:\Software Development\Languages, Frameworks,
etc\nodeJs\npm.CMD
Languages:
Python: 3.7.0 - C:\Users\conno\AppData\Local\Programs\Python\Python37-32\python.EXE
Browsers:
Edge: 42.17134.1.0
npmPackages:
gatsby: ^2.0.118 => 2.0.118
gatsby-image: ^2.0.19 => 2.0.29
gatsby-plugin-buildtime-timezone: ^1.0.3 => 1.0.3
gatsby-plugin-manifest: ^2.0.7 => 2.0.17
gatsby-plugin-offline: ^2.0.23 => 2.0.23
gatsby-plugin-react-helmet: ^3.0.1 => 3.0.6
gatsby-plugin-sass: ^2.0.2 => 2.0.10
gatsby-plugin-sharp: ^2.0.11 => 2.0.20
gatsby-source-filesystem: ^2.0.6 => 2.0.20
gatsby-transformer-remark: ^2.2.4 => 2.2.4
gatsby-transformer-sharp: ^2.1.7 => 2.1.13
error The system cannot find the path specified.
Error: The system cannot find the path specified.
envinfo.js:1 Function.e.exports.sync
[childishhalbino.github.io]/[envinfo]/dist/envinfo.js:1:4970
envinfo.js:1 Object.copySync
[childishhalbino.github.io]/[envinfo]/dist/envinfo.js:1:6694 8
envinfo.js:1 Object.t.writeSync.e [as writeSync]
[childishhalbino.github.io]/[envinfo]/dist/envinfo.js:1:4877 7
envinfo.js:1
[childishhalbino.github.io]/[envinfo]/dist/envinfo.js:1:4693 4
envinfo.js:1 Promise.all.then.e
[childishhalbino.github.io]/[envinfo]/dist/envinfo.js:1:4694 9
util.js:16 tryCatcher
[childishhalbino.github.io]/[bluebird]/js/release/util.js:16 :23
promise.js:512 Promise._settlePromiseFromHandler
[childishhalbino.github.io]/[bluebird]/js/release/promise.js :512:31
promise.js:569 Promise._settlePromise
[childishhalbino.github.io]/[bluebird]/js/release/promise.js :569:18
promise.js:614 Promise._settlePromise0
[childishhalbino.github.io]/[bluebird]/js/release/promise.js :614:10
promise.js:694 Promise._settlePromises
[childishhalbino.github.io]/[bluebird]/js/release/promise.js :694:18
promise.js:638 Promise._fulfill
[childishhalbino.github.io]/[bluebird]/js/release/promise.js :638:18
promise_array.js:126 PromiseArray._resolve
[childishhalbino.github.io]/[bluebird]/js/release/promise_ar ray.js:126:19
promise_array.js:144 PromiseArray._promiseFulfilled
[childishhalbino.github.io]/[bluebird]/js/release/promise_ar ray.js:144:14
promise.js:574 Promise._settlePromise
[childishhalbino.github.io]/[bluebird]/js/release/promise.js :574:26
promise.js:614 Promise._settlePromise0
[childishhalbino.github.io]/[bluebird]/js/release/promise.js :614:10
promise.js:694 Promise._settlePromises
[childishhalbino.github.io]/[bluebird]/js/release/promise.js :694:18
error UNHANDLED REJECTION
Error: The system cannot find the path specified.
envinfo.js:1 Function.e.exports.sync
[childishhalbino.github.io]/[envinfo]/dist/envinfo.js:1:4970
envinfo.js:1 Object.copySync
[childishhalbino.github.io]/[envinfo]/dist/envinfo.js:1:6694 8
envinfo.js:1 Object.t.writeSync.e [as writeSync]
[childishhalbino.github.io]/[envinfo]/dist/envinfo.js:1:4877 7
envinfo.js:1
[childishhalbino.github.io]/[envinfo]/dist/envinfo.js:1:4693 4
envinfo.js:1 Promise.all.then.e
[childishhalbino.github.io]/[envinfo]/dist/envinfo.js:1:4694 9
util.js:16 tryCatcher
[childishhalbino.github.io]/[bluebird]/js/release/util.js:16 :23
promise.js:512 Promise._settlePromiseFromHandler
[childishhalbino.github.io]/[bluebird]/js/release/promise.js :512:31
promise.js:569 Promise._settlePromise
[childishhalbino.github.io]/[bluebird]/js/release/promise.js :569:18
promise.js:614 Promise._settlePromise0
[childishhalbino.github.io]/[bluebird]/js/release/promise.js :614:10
promise.js:694 Promise._settlePromises
[childishhalbino.github.io]/[bluebird]/js/release/promise.js :694:18
promise.js:638 Promise._fulfill
[childishhalbino.github.io]/[bluebird]/js/release/promise.js :638:18
promise_array.js:126 PromiseArray._resolve
[childishhalbino.github.io]/[bluebird]/js/release/promise_ar ray.js:126:19
promise_array.js:144 PromiseArray._promiseFulfilled
[childishhalbino.github.io]/[bluebird]/js/release/promise_ar ray.js:144:14
promise.js:574 Promise._settlePromise
[childishhalbino.github.io]/[bluebird]/js/release/promise.js :574:26
promise.js:614 Promise._settlePromise0
[childishhalbino.github.io]/[bluebird]/js/release/promise.js :614:10
promise.js:694 Promise._settlePromises
[childishhalbino.github.io]/[bluebird]/js/release/promise.js :694:18
The text was updated successfully, but these errors were encountered: