d4rekanguok/gatsby-typescript

Duplicate identifier 'PagesQueryQueryVariables'

Opened this issue · 3 comments

I'm suddenly getting a whole bunch of errors when trying to start my project.

 ERROR #98123  WEBPACK      

Generating SSR bundle failed

ERROR in D:/Projects/project/graphql-types.ts(4312,13):
4312:13 Duplicate identifier 'PagesQueryQueryVariables'.


 ERROR #98123  WEBPACK

Generating SSR bundle failed

ERROR in D:/Projects/project/graphql-types.ts(4315,13):
4315:13 Duplicate identifier 'PagesQueryQuery'.

And the bottom part of by graphql-types.ts-file looks like this:

export type PagesQueryQueryVariables = {};


export type PagesQueryQuery = { allSitePage: { nodes: Array<Pick<SitePage, 'path'>> } };

export type PagesQueryQueryVariables = {};


export type PagesQueryQuery = { allSitePage: { nodes: Array<Pick<SitePage, 'path'>> } };

Hi @Glinkis, thanks for opening this!

I'm suddenly getting a whole bunch of errors when trying to start my project.

Does this mean that it worked properly before? What is your gatsby and gatsby-plugin-ts or gatsby-plugin-graphql-codegen version?

It would help us greatly if we know how to reproduce this issue!

Yes, definitely worked before. I have narrowed down the difference to a dependency update I did.
The packages/versions that was updated:

"@types/react": "16.9.35" -> "16.9.35"
"@types/react-dom": "16.9.7" -> "16.9.8"
"gatsby": "2.21.10" -> "2.21.21"
"gatsby-source-contentful":  "2.3.1" -> "2.3.3"

Thanks @Glinkis, this is valuable info — Will try to reproduce this!