Closed Somiona closed 4 years ago
Hi. Thanks for the report. From the error message, this looks like an issue with gatsby-plugin-generate-typings. Could you file the issue there. If it turns out to be an issue with Gatsby then please do open a new ticket here and include the full plugin config and a link to the ticket on gatsby-plugin-generate-typings.
Description
When any of pages used graphql query and run
gatsby develop
will lead to crash at the state ofonPostBootstrap
But if I start develop server with no query first, and then add a new query into page, everything will work just fine. I'm using yarn. But npm results the same thing.Steps to reproduce
I'm using typescript.
core code:
and
gatsby-config.js
is configured as:Expected result
It should at least run without crash.
Actual result
ERROR
error when trying to parse schema, ignoring Unable to find any GraphQL type defintions for the following pointers: C:\HomePage.cache\fragments*.js
Error: Unable to find any GraphQL type defintions for the following pointers: C:\HomePage.cache\fragments *.js
load-typedefs.ts:91 Object.loadTypedefs [HomePage]/[graphql-toolkit]/src/loaders/load-typedefs.ts:91:11
documents.ts:8 Object.loadDocuments [HomePage]/[graphql-toolkit]/src/loaders/documents.ts:8:10
ERROR
UNHANDLED REJECTION Cannot read property 'definitions' of undefined
TypeError: Cannot read property 'definitions' of undefined
index.cjs.js:397 [HomePage]/[@graphql-toolkit]/common/index.cjs.js:397:69
Array.map
index.cjs.js:394 Object.validateGraphQlDocuments [HomePage]/[@graphql-toolkit]/common/index.cjs.js:394:50
index.cjs.js:88 Object.codegen [HomePage]/[@graphql-codegen]/core/index.cjs.js:88:24
Environment
System: OS: Windows 10 10.0.18363 CPU: (12) x64 AMD Ryzen 5 2600X Six-Core Processor
Binaries: Node: 12.16.1 - C:\Users\54357\scoop\apps\nodejs-lts\current\node.EXE Yarn: 1.22.4 - C:\Users\54357\scoop\apps\yarn\current\Yarn\bin\yarn.CMD npm: 6.13.4 - C:\Users\54357\scoop\apps\nodejs-lts\current\npm.CMD Languages: Python: 3.7.7 - C:\Users\54357\scoop\shims\python.EXE Browsers: Edge: 44.18362.449.0 npmPackages: gatsby: ^2.19.7 => 2.19.43 gatsby-image: ^2.2.43 => 2.2.43 gatsby-plugin-catch-links: ^2.1.21 => 2.1.27 gatsby-plugin-eslint: ^2.0.8 => 2.0.8 gatsby-plugin-generate-typings: ^0.9.8-r1 => 0.9.8-r1 gatsby-plugin-google-analytics: ^2.1.31 => 2.1.37 gatsby-plugin-manifest: ^2.2.39 => 2.2.47 gatsby-plugin-minify-classnames: ^0.1.2 => 0.1.2 gatsby-plugin-offline: ^3.0.40 => 3.0.40 gatsby-plugin-purgecss: ^4.0.1 => 4.0.1 gatsby-plugin-react-helmet: ^3.1.23 => 3.1.23 gatsby-plugin-robots-txt: ^1.5.0 => 1.5.0 gatsby-plugin-sass: ^2.1.26 => 2.1.30 gatsby-plugin-sharp: ^2.4.12 => 2.4.12 gatsby-plugin-sitemap: ^2.2.29 => 2.2.29 gatsby-plugin-typescript: ^2.2.3 => 2.2.3 gatsby-remark-copy-linked-files: ^2.1.39 => 2.1.39 gatsby-remark-images: ^3.1.49 => 3.1.49 gatsby-remark-prismjs: ^3.3.35 => 3.3.35 gatsby-remark-responsive-iframe: ^2.2.33 => 2.2.33 gatsby-remark-smartypants: ^2.1.19 => 2.1.22 gatsby-source-filesystem: ^2.1.55 => 2.1.55 gatsby-transformer-json: ^2.2.22 => 2.2.27 gatsby-transformer-remark: ^2.6.58 => 2.6.58 gatsby-transformer-sharp: ^2.3.9 => 2.3.18