Я пытаюсь развернуть свой сайт в Гэтсби / WordPress для нетлификации, но проблема остается той же.
11: 06: 17 PM: Путь: / wp-json
23:06:17 PM: Ответ сервера был «404 Not Found»
23:06:17 PM: ошибка подключаемого модуляgatsby-source-wordpress возвратил ошибку
23:06:17 вечера:
23:06:17 вечера: TypeError: Невозможно прочитать свойство 'data' из неопределенного
23:06:17 вечера:
11:06:17 PM: - fetch.js: 141 fetch
11:06:17 PM: [repo] / [gatsby-source-wordpress] /fetch.js:141:21
11:06: 17:00:
11:06:17 PM: - next_tick.js: 68 process._tickCallback
Я пытался изменить BaseURL, но все равно получаю сообщение об ошибке.
Мой Гэтсби.config:
require('regenerator-runtime/runtime')
require('dotenv').config({
path: '.env',
});
const path = require('path');
module.exports = {
pathPrefix: `/mameri`,
siteMetadata: {
title: `quentinmameri`,
description: `Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.`,
author: `@gatsbyjs`,
},
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: `#663399`,
theme_color: `#663399`,
display: `minimal-ui`,
icon: `src/images/gatsby-icon.png`, // This path is relative to the root of the site.
},
},
{
resolve: `gatsby-source-wordpress`,
options: {
/*
* The base URL of the Wordpress site without the trailingslash and the protocol. This is required.
* Example : 'gatsbyjsexamplewordpress.wordpress.com' or 'www.example-site.com'
*/
baseUrl: "qmavocats.wordpress.com",
// The protocol. This can be http or https.
protocol: "https",
// Indicates whether the site is hosted on wordpress.com.
// If false, then the assumption is made that the site is self hosted.
// If true, then the plugin will source its content on wordpress.com using the JSON REST API V2.
// If your site is hosted on wordpress.org, then set this to false.
hostingWPCOM: false,
// If useACF is true, then the source plugin will try to import the Wordpress ACF Plugin contents.
// This feature is untested for sites hosted on wordpress.com.
// Defaults to true.
useACF: true,
}
},
// this (optional) plugin enables Progressive Web App + Offline functionality
// To learn more, visit: https://gatsby.dev/offline
// `gatsby-plugin-offline`,
],
}
Я не знаю, почему у меня такая ошибка.Спасибо за вашу помощь.