Build fails with:
WebpackError: The result of this StaticQuery could not be fetched.
pointing to this query:
const data = useStaticQuery(graphql`
query ComponentsQuery {
allFile(
filter: { relativePath: { regex: "/^components/.*/index.js/" } }
sort: { order: ASC, fields: relativePath }
) {
edges {
node {
relativeDirectory
}
}
}
}
`);
1. git clone https://github.com/moroshko/basis.git
2. cd basis
3. git checkout themes-refactor
4. npm install
5. npm run build
Build should succeed.
Build fails.
System:
OS: macOS 10.15.4
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.6.0 - ~/.nvm/versions/node/v12.6.0/bin/node
Yarn: 1.22.4 - ~/.yarn/bin/yarn
npm: 6.14.6 - ~/.nvm/versions/node/v12.6.0/bin/npm
Languages:
Python: 2.7.16 - /usr/bin/python
Browsers:
Chrome: 84.0.4147.89
Firefox: 78.0.2
Safari: 13.1
I upgraded gatsby
from 2.24.1
to 2.24.7
and it fixed the issue.
I have a gatsby 2.24.7 and he still the same result.
Most helpful comment
I upgraded
gatsby
from2.24.1
to2.24.7
and it fixed the issue.