Source plugin for pulling data into Gatsby from a Directus API.
11
stars
12
forks
source link
Missing onError handler for invocation 'building-schema', error was 'Error: Schema must contain uniquely named types but contains multiple types named "File".'. Stacktrace was 'Error: Schema must contain uniquely named types but contains multiple types named "File". #6
[x] There's no other issue that already describes my problem.
Describe the Bug
gatsby throws an error when reloading a page file.
info changed file at /home/user/project/src/pages/index.js
ERROR
Missing onError handler for invocation 'building-schema', error was 'Error: Schema must contain uniquely named types but contains multiple types named
"File".'. Stacktrace was 'Error: Schema must contain uniquely named types but contains multiple types named "File".
at new GraphQLSchema (/home/user/project/node_modules/graphql/type/schema.js:194:15)
at SchemaComposer.buildSchema (/home/user/project/node_modules/graphql-compose/src/SchemaComposer.ts:242:12)
at buildSchema (/home/user/project/node_modules/gatsby/src/schema/schema.js:84:33)
at build (/home/user/project/node_modules/gatsby/src/schema/index.js:111:18)
at buildSchema (/home/user/project/node_modules/gatsby/src/services/build-schema.ts:19:3)'
When I start the development server there are no issue but when I reload any page existing in ./src/pages/ I got this error.
To Reproduce
1 - Init a fresh gatsby project (Typescript or javascript) I tested both
2 - In package.json
Preflight Checklist
Describe the Bug
gatsby throws an error when reloading a page file.
When I start the development server there are no issue but when I reload any page existing in
./src/pages/
I got this error.To Reproduce
1 - Init a fresh gatsby project (Typescript or javascript) I tested both 2 - In
package.json
3 - In
gatsby-config
4 - Start the development server (it will work) 5 - Make a minor change in
src/pages/index.js
and save 6 - You will get the errorWhat version of Directus are you using?
9.18.1
What version of Node.js are you using?
v16.17.1
What version of Node.js are you using with gatsby?
v16.16.0
What database are you using?
MySql
What operating system are you using?
Linux 5.10.76-linuxkit
How are you deploying Directus?
On a VPS with
pm2
andnginx
for reverse proxy