1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

gatsby develop で Missing onError handler for invocation 'building-schema' エラー

Posted at

環境

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) に変更

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?