I want to make a bilingual form on my website and followed this tutorial. I'm not sure what is undefined here, although I think it has something to do with gatsby-plugin-intl (I thought maybe it's because I don't have a json file for my non-English content, but I added a zh-TW.json and still get the same error. I also get the same error when calling localhost:8000 instead of localhost:8000/contact). The errors only came up after running the npm run extract -- 'src/**/*.js*' --out-file src/intl/en.json --format simple command.
gatsby-config.js
const supportedLanguages = [
    { id: 'en', label: 'English' },
    { id: 'zh-TW', label: '中文 (繁體)' },
  ]
const defaultLanguage = 'en'
module.exports = {
    siteMetadata: {
        title: `Gatsby Markdown Blog`,
        description: `Learn how to make a blog with Gatsby and Markdown posts.`,
    },
    plugins: [
        {
            resolve: `gatsby-plugin-mdx`,
            options: {
                extensions: [`.mdx`, `.md`],
            },
        },
        {
            resolve: `gatsby-source-filesystem`,
            options: {
                name: `posts`,
                path: `${__dirname}/src/posts`,
            },
        },
        {
            resolve: `gatsby-plugin-intl`,
            options: {
                path: `${__dirname}/src/intl`,
                languages: supportedLanguages,
                defaultLanguage: defaultLanguage,
                redirect: true,  // switch to false when zh content ready to prevent gatsby-plugin-intl from auto-redirecting to default language versions
            },
        },
    ],
}
browser
 React components in Gatsby must render successfully in the browser and in a node.js environment. When we tried to render your page component in node.js, it errored.
    URL path: /contact/
    File path: undefined
terminal
warn The path "/contact/" errored during SSR.
    Edit its component undefined to resolve the error.
 ERROR
Cannot read property 'split' of undefined
  TypeError: Cannot read property 'split' of undefined
  - render-dev-html-child.js:65 parseError
    [blog]/[gatsby]/src/utils/dev-ssr/render-dev-html-child.js:65:26
  - render-dev-html-child.js:166
    [blog]/[gatsby]/src/utils/dev-ssr/render-dev-html-child.js:166:23
  - new Promise
  - render-dev-html-child.js:135 Object.exports.renderHTML
    [blog]/[gatsby]/src/utils/dev-ssr/render-dev-html-child.js:135:3
  - processChild.js:155 execFunction
    [blog]/[jest-worker]/build/workers/processChild.js:155:17
  - processChild.js:139 execHelper
    [blog]/[jest-worker]/build/workers/processChild.js:139:5
  - processChild.js:143 execMethod
    [blog]/[jest-worker]/build/workers/processChild.js:143:5
  - processChild.js:64 process.<anonymous>
    [blog]/[jest-worker]/build/workers/processChild.js:64:7
  - node:events:369 process.emit
    node:events:369:20
  - source-map-support.js:495 process.emit
    [blog]/[source-map-support]/source-map-support.js:495:21
src/components/Form.js
import React from "react";
import { FormattedMessage, useIntl } from "gatsby-plugin-intl";
const Form = () => {
  const intl = useIntl(); // hook; pass in object that contains id and default message to ensure that 
  return (
    <div>
      <label for="email">
        <FormattedMessage id="email_label" defaultMessage="Email address" /> {/* pass id and defaultMessage down as props to render new string inside of a react fragment child element  */}
      </label>
      <input
        type="email"
        id="email"
        placeholder={intl.formattedMessage({
          id: "email_input",
          defaultMessage: "Email address",
        })}
      />
      
      <label for="Password">
        <FormattedMessage id="password_label" defaultMessage="Password" />
      </label>
      <input type="password" id="password" />
      <button type="submit" onSubmit={this.handleSubmit}>
        <FormattedMessage id="submit_button" defaultMessage="submit" />
      </button>
    </div>
  );
};
export default Form;
src/intl/en.json
{
  "email_label": "Email address",
  "password_label": "Password",
  "submit_button": "submit"
}
src/intl/zh-TW.json
{
  "email_label": "電郵地址",
  "password_label": "密碼",
  "submit_button": "提交"
}
src/pages/contact.js
import React from 'react'
import styled from 'styled-components'
import Navbar from '../components/Navbar.js'
import Form from '../components/Form.js'
const Body = styled.body`
    margin-left: 6%;
`
export default function Contact() {
    return (
        <div>
            <Navbar/>
            <Body>
            <Form/>
            </Body>
        </div>
    )
}