🦔

【Gatsby】TypeError: The "path" argument must be of type string.の対処法

2022/11/17に公開

状況

  • gatsby-plugin-manifestを入れようとした
 ERROR

The "path" argument must be of type string. Received an instance of Object



  TypeError: The "path" argument must be of type string. Received an instance of
   Object
    "gatsby-plugin-react-helmet",
    {
      resolved: `gatsby-plugin-manifest`,
      options: {
        name: "ここにサイト名",
        short_name: "ここに以下略",
        start_url: "/",
        background_color: "#ffffff",
        theme_color: "#477294",
        display: "standalone",
        icon:`src/images/icon.png`,
      }
    },
    "gatsby-plugin-offline",
  ],

""を``に変えてみたが変化なし

  `gatsby-plugin-react-helmet`,
  {
    resolved: `gatsby-plugin-manifest`,
    options: {
      name: `ここにサイト名`,
      short_name: `ここに以下略`,
      start_url: `/`,
      background_color: `#ffffff`,
      theme_color: `#477294`,
      display: `standalone`,
      icon: `src/images/icon.png`,
    }
  },
  `gatsby-plugin-offline`,
],
}

結論

    {
-      resolved: `gatsby-plugin-manifest`, 
+      resolve: `gatsby-plugin-manifest`, 
      options: {
        name: `ここにサイト名`,
        short_name: `ここに以下略`,
        start_url: `/`,
        background_color: `#ffffff`,
        theme_color: `#477294`,
        display: `standalone`,
        icon: `src/images/icon.png`,
      }
    },
    `gatsby-plugin-offline`,
  ],

resoveがresolvedになっていた!しょうもない!!
https://www.codegrepper.com/search.php?answer_removed=1&q=error The "path" argument must be of type string
react-scriptsなんて入れてなかったので色々調べていたんですが、ただのタイプミスとは。。30分(体感)ぐらい無駄にした。。

Discussion