gatsby-source-contentful with DSG on a page giving error when accessed from Vercel #38972
Open
2 tasks done
Labels
status: triage needed
Issue or pull request that need to be triaged and assigned to a reviewer
type: bug
An issue or pull request relating to a bug in Gatsby
Preliminary Checks
Description
When using Gatsby Source Contentful plugin and apply DSG on a page that using Graphql from Contentful on Vercel, then that page will be error. If DSG applied to a page without Graphql from Contentful, it can be viewed without error.
Reproduction Link
https://github.com/7sferry/contentful-gatsby-reproduction
Steps to Reproduce
Expected Result
DSG page run without error with contentful on vercel and the page can be viewed
Actual Result
the page with DSR that contains graphql from contentful cannot be viewed and the runtime log writes:
error "gatsby-source-contentful" threw an error while running the createSchemaCustomization lifecycle:
ENOENT: no such file or directory, mkdir '/var/task/.cache/caches-lmdb'
�[0m
�[0m �[0m�[97m�[41mError�[0m�[37m�[41m:�[0m�[37m�[41m �[0m�[97m�[41mENOENT: no such file or directory, mkdir '/var/task/.cache/caches-lmdb'�[0m �[0m
�[0m �[0m�[90m-�[0m �[0m�[93mnode:fs�[0m�[90m:�[0m�[93m1373�[0m�[37m �[0m�[37mObject.mkdirSync�[0m
�[0m �[0m �[0m�[90mnode:fs:1373:26�[0m
�[0m �[0m
�[0m �[0m�[90m-�[0m �[0m�[93mindex.js�[0m�[90m:�[0m�[93m2224�[0m�[37m �[0m�[37mopen�[0m
�[0m �[0m �[0m�[90m/var/task/.cache/query-engine/index.js:2224:6�[0m
�[0m �[0m
�[0m �[0m�[90m-�[0m �[0m�[93mindex.js�[0m�[90m:�[0m�[93m142�[0m�[37m �[0m�[37mFunction.getStore�[0m
�[0m �[0m �[0m�[90m/var/task/.cache/query-engine/index.js:142:29�[0m
�[0m �[0m
�[0m �[0m�[90m-�[0m �[0m�[93mindex.js�[0m�[90m:�[0m�[93m153�[0m�[37m �[0m�[37mGatsbyCacheLmdb.getDb�[0m
�[0m �[0m �[0m�[90m/var/task/.cache/query-engine/index.js:153:33�[0m
�[0m �[0m
�[0m �[0m�[90m-�[0m �[0m�[93mindex.js�[0m�[90m:�[0m�[93m164�[0m�[37m �[0m�[37mGatsbyCacheLmdb.set�[0m
�[0m �[0m �[0m�[90m/var/task/.cache/query-engine/index.js:164:16�[0m
�[0m �[0m
�[0m �[0m�[90m-�[0m �[0m�[93mindex.js�[0m�[90m:�[0m�[93m298372�[0m�[37m �[0m�[37mgetContentTypesFromContentful�[0m
�[0m �[0m �[0m�[90m/var/task/.cache/query-engine/index.js:298372:15�[0m
�[0m �[0m
�[0m �[0m�[90m-�[0m �[0m�[93mtask_queues�[0m�[90m:�[0m�[93m95�[0m�[37m �[0m�[37mprocessTicksAndRejections�[0m
�[0m �[0m �[0m�[90mnode:internal/process/task_queues:95:5�[0m
�[0m �[0m
�[0m �[0m�[90m-�[0m �[0m�[93mindex.js�[0m�[90m:�[0m�[93m298393�[0m�[37m �[0m�[37mModule.createSchemaCustomization�[0m
�[0m �[0m �[0m�[90m/var/task/.cache/query-engine/index.js:298393:24�[0m
�[0m �[0m
�[0m �[0m�[90m-�[0m �[0m�[93mindex.js�[0m�[90m:�[0m�[93m261017�[0m�[37m �[0m�[37mrunAPI�[0m
�[0m �[0m �[0m�[90m/var/task/.cache/query-engine/index.js:261017:16�[0m
�[0m �[0m
�[0m
Unhandled Rejection: Error: Schema must contain uniquely named types but contains multiple types named "ImageResizingBehavior".
at new GraphQLSchema (/var/task/.cache/query-engine/index.js:97724:15)
at SchemaComposer.buildSchema (/var/task/.cache/query-engine/index.js:121218:16)
at addCustomResolveFunctions (/var/task/.cache/query-engine/index.js:272943:45)
at updateSchemaComposer (/var/task/.cache/query-engine/index.js:272322:9)
at buildSchema (/var/task/.cache/query-engine/index.js:272218:3)
at build (/var/task/.cache/query-engine/index.js:30354:18)
at GraphQLEngine._doGetRunner (/var/task/.cache/query-engine/index.js:363721:7)
Unhandled Rejection: Error: Schema must contain uniquely named types but contains multiple types named "ImageResizingBehavior".
at new GraphQLSchema (/var/task/.cache/query-engine/index.js:97724:15)
at SchemaComposer.buildSchema (/var/task/.cache/query-engine/index.js:121218:16)
at addCustomResolveFunctions (/var/task/.cache/query-engine/index.js:272943:45)
at updateSchemaComposer (/var/task/.cache/query-engine/index.js:272322:9)
at buildSchema (/var/task/.cache/query-engine/index.js:272218:3)
at build (/var/task/.cache/query-engine/index.js:30354:18)
at GraphQLEngine._doGetRunner (/var/task/.cache/query-engine/index.js:363721:7)
Node.js process exited with exit status: 128. The logs above can help with debugging the issue.
Unknown application error occurred
Environment
Config Flags
The text was updated successfully, but these errors were encountered: