Open jephjohnson opened 3 years ago
Updated to ^2.7.1 and backup and running, however can't update to gatsby 3 due :(
@jephjohnson Not sure if this will help, but check for any unnamed queries in your src
folder, and name them if they aren't. e.g. query MyQuery name{}
instead of query{}
. Then maybe if nothing there, exclude './node_modules/gatsby-*/**/*.js'
from your documentPaths to see if there's something causing it there.
query
Currently the only instances I have when the query doesn't have a name is when using 'useStaticQuery' ie:
const { site } = useStaticQuery(
graphql`
query {
site {
siteMetadata {
title
description
author
}
}
}
`
);
@jephjohnson if you change that to
const { site } = useStaticQuery(
graphql`
query SiteDetails {
site {
siteMetadata {
title
description
author
}
}
}
`
);
Does it help at all? I just ran into this error when adding gatsby-node.ts
to codegen documentPaths and I had some unnamed queries. After adding a name, the error went.
Describe the bug All was working great and now I keep getting the error 'Failed to validate error Error [ValidationError]: "name" is not allowed' I've tried removing node modules and re-installing and gatsby clean. Nothing is resolving this issue
To Reproduce yarn build
Environment (please complete the relevant info):
Additional context Package.json
tsconfig.json:
gatsby.config: