Npm 安装插件后gatsby mdx出现错误

Npm 安装插件后gatsby mdx出现错误,npm,gatsby,Npm,Gatsby,我正在构建我的第一个盖茨比博客应用程序 在添加了一些页面和导航栏之后,我准备在浏览器上显示mdx文件。 然而,在npm安装了一些插件和配置文件之后,我开始一个接一个地出现错误 现在我陷入了这个错误。 无法解决它。有人能告诉我我做错了什么吗?如果我的代码中有更好的方法,也请告诉我 错误 $ npm start > gatsby-starter-default@0.1.0 start C:\Users\djhid\Desktop\coding\github\WebApps\gatsby\b

我正在构建我的第一个盖茨比博客应用程序

在添加了一些页面和导航栏之后,我准备在浏览器上显示mdx文件。 然而,在npm安装了一些插件和配置文件之后,我开始一个接一个地出现错误

现在我陷入了这个错误。 无法解决它。有人能告诉我我做错了什么吗?如果我的代码中有更好的方法,也请告诉我

错误

$ npm start

> gatsby-starter-default@0.1.0 start C:\Users\djhid\Desktop\coding\github\WebApps\gatsby\basic-blog
> npm run develop


> gatsby-starter-default@0.1.0 develop C:\Users\djhid\Desktop\coding\github\WebApps\gatsby\basic-blog
> gatsby develop

The above error occurred in the <StoreStateProvider> component:
    in StoreStateProvider
    in App

React will try to recreate this component tree from scratch using the error boundary you provided, App.
Warning: App: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an
error message or fallback UI.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! gatsby-starter-default@0.1.0 develop: `gatsby develop`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the gatsby-starter-default@0.1.0 develop script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\djhid\AppData\Roaming\npm-cache\_logs\2020-09-15T12_37_46_046Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! gatsby-starter-default@0.1.0 start: `npm run develop`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the gatsby-starter-default@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\djhid\AppData\Roaming\npm-cache\_logs\2020-09-15T12_37_46_085Z-debug.log
module.exports = {
  siteMetadata: {
    title: `Blog`,
    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`,
      },
    },
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        name: `posts`,
        path: `${__dirname}/src/posts`,
      },
    },
    `gatsby-transformer-sharp`,
    `gatsby-plugin-sharp`,
    {
      resolve: `gatsby-plugin-mdx`,
      options: {
        extensions: [`.md`, `.mdx`],
        gatsbyRemarkPlugins: [
          {
            resolve: `gatsby-remark-images`,
            options: {
              maxWidth: 1200,
            },
          },
        ],
      },
    },
    {
      resolve: `gatsby-plugin-google-fonts`,
      options: {
        fonts: [`roboto mono`, `muli\:400, 400i, 700, 700i`],
        display: "swap"
      }
    },
    {
      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.
      },
    },
    // this (optional) plugin enables Progressive Web App + Offline functionality
    // To learn more, visit: https://gatsby.dev/offline
    // `gatsby-plugin-offline`,
  ],
}