Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Eコマースのチュートリアルで英語版チュートリアルの指示通りにgatsby-config.jsを設定するとエラーが発生する #132

@naoya7076

Description

@naoya7076

#89

概要

現在、eコマースのチュートリアルの翻訳を進めています。
Installing the StripeJS plugin
というセクションについてなのですが指示通りにgatsby-config.jsを設定するとエラーが発生します。
この場合はgatsby-config.jsをはどちらにすればいいでしょうか?

詳細

英語版チュートリアルのgatsby-config.js

module.exports = {
  siteMetadata: {
    title: "Gatsby E-Commerce Starter",
  },
  plugins: ["gatsby-plugin-react-helmet", "gatsby-plugin-stripe"],
}

この通りにgatsby-config.jsを設定してnpm run developを実行すると以下のエラーが発生します
image

しかし、このように設定すると動作します。

module.exports = {
  siteMetadata: {
    title: `Gatsby E-Commerce Starter`,
    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.
      },
    },
    `gatsby-plugin-stripe`
    // this (optional) plugin enables Progressive Web App + Offline functionality
    // To learn more, visit: https://gatsby.dev/offline
    // `gatsby-plugin-offline`,
  ],
}

image

資料

私のeコマースチュートリアルのレポジトリ
私の翻訳プロジェクトのプルリクエスト

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions