環境
MacOS Catalina 10.15.7
nodejs v16.8.0
Gatsby CLI version: 4.18.0
"gatsby": "^4.18.0",
"react": "^18.1.0",
"react-dom": "^18.1.0"
"gatsby-plugin-image": "^2.18.0",
"gatsby-plugin-sass": "^5.18.0",
"gatsby-plugin-sharp": "^4.18.0",
"gatsby-source-wordpress": "^6.18.0",
"gatsby-transformer-sharp": "^4.18.0",
"prettier": "^2.7.1",
"sass": "^1.53.0"
Local 6.4.1
WordPress 5.9.3
WP Gatsby 2.3.3
WP GraphQL 1.8.6
WP Multibyte Patch 2.9
症状
Local で WordPress を起動
.env の WPGRAPHQL_URL に Local の graphql を設定
gatsby-config.js
require('dotenv').config();
module.exports = {
plugins: [
{
resolve: `gatsby-source-wordpress`,
options: {
url: process.env.WPGRAPHQL_URL,
},
},
`gatsby-plugin-image`,
`gatsby-plugin-sharp`,
`gatsby-transformer-sharp`,
`gatsby-plugin-sass`,
],
}
gatsby develop
で下記エラー
Missing onError handler for invocation 'building-schema', error was 'Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "WpTemplate_空白" does not.'. Stacktrace was 'GraphQLError: Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "WpTemplate_空白" does not.
対応
WordPress管理画面で 設定
一般
サイトの言語
を 日本語
から English(United States)
に変更