#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を実行すると以下のエラーが発生します

しかし、このように設定すると動作します。
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`,
],
}

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