Ошибка вывода времени в плагине gatsby-source-wordpress

#wordpress #graphql #gatsby

#wordpress #graphql #gatsby

Вопрос:

Веб-сайт был создан с помощью Gatsby.JS как уровень представления и безголовый WordPress как хранилище для записей в блоге.

Плагин WP Github Trigger использовался для перестроения страницы после добавления записи в WordPress, которая отправляет уведомление на Github в случае сохранения сообщения и активирует процесс создания проекта и отправки его на сервер веб-сайта.

Когда я запустил действие GitHub, я получаю журнал:

 error  gatsby-source-wordpress  connect ETIMEDOUT xx.xx.xx.xx:80 

GraphQL request to http://example.com/graphql failed.

Please ensure the following statements are true 
  - your WordPress URL is correct in gatsby-config.js
  - your server is responding to requests 
  - WPGraphQL and WPGatsby are installed in your WordPress backend
not finished createSchemaCustomization - 260.923s
 

Мой gatsby-config.js файл:

 const isDev = process.env.NODE_ENV === `development`;

require('dotenv').config({
  path: `.env.${isDev ? 'development' : 'production'}`,
});


module.exports = {
  siteMetadata: {
    title: `xxx`,
    description: `xxx`,
    author: `xxx`,
    client: {
      fullName: 'xxx',
      profession: 'xxx',
      telephone: 'xxx',
      email: 'xxxx',
      address: {
        street: 'xxxx',
        city: 'xxx',
      },
    },
  },
  plugins: [
    `gatsby-plugin-react-helmet`,
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        name: `images`,
        path: `${__dirname}/src/images`,
      },
    },
    `gatsby-transformer-sharp`,
    `gatsby-plugin-sharp`,
    {
      resolve: `gatsby-plugin-manifest`,
      options: {
        name: `gatsby-starter-default`,
        short_name: `starter`,
        start_url: `/`,
        background_color: `#012501`,
        theme_color: `#012501`,
        display: `minimal-ui`,
        icon: `src/images/favicon-32x32.png`, 
      },
    },
    {
      resolve: 'gatsby-source-wordpress-experimental',
      options: {
        url: process.env.WPGRAPHQL_URL, // this URL is correct (xxx.com/graphql endpoint)
        schema: {
          typePrefix: `Wp`,
        },
        develop: {
          hardCacheMediaFiles: true,
        },
        type: {
          Post: {
            limit: isDev ? 50 : 5000,
          },
        },
      },
    },
    {
      resolve: 'gatsby-plugin-react-svg',
      options: {
        rule: {
          include: /images/,
        },
      },
    },
    {
      resolve: `gatsby-plugin-styled-components`,
      options: isDev ? { displayName: true } : undefined,
    },
    {
      resolve: `gatsby-plugin-scroll-reveal`,
      options: {
        threshold: 0.001, 
        once: true, 
        disable: false, 
        selector: '[data-sal]', 
        rootMargin: '0% 10%', 

      },
    },
  ],
};
 

Это мой первый сайт, созданный с помощью Gatsby (такова была потребность человека, для которого я это делаю).

Сначала я подумал, что это проблема с доступом по ip, но, несмотря на добавление в список разрешенных, это не помогло.

У вас есть какие-либо идеи, что может быть причиной ошибки?

Ответ №1:

Вы можете изменить свою команду разработки на, в вашем package.json :

 "develop": "GATSBY_CONCURRENT_DOWNLOAD=5 gatsby develop",
 

Это должно сработать.

Комментарии:

1. все та же проблема: (