@ reach / router中的错误导致为“ / offline-plugin-app-shell-fallback /”构建静态HTML时出错

时间:2020-09-20 23:30:21

标签: gatsby

这是gatsby build的当前结果 Build console output


package.json

{
  "name": "app",
  "private": true,
  "description": "Internet plan indexing application",
  "version": "1.0.0",
  "scripts": {
    "build": "yarn build:app && yarn build:lambda",
    "build:app": "gatsby build --log-pages",
    "build:lambda": "netlify-lambda build functions",
    "serve": "yarn serve:app && yarn serve:lambda",
    "serve:app": "gatsby serve",
    "serve:lambda": "netlify-lambda serve functions",
    "start": "gatsby develop",
    "test": "jest"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/Nector-Telecom"
  },
  "dependencies": {
    "@fortawesome/fontawesome-svg-core": "^1.2.24",
    "@fortawesome/free-solid-svg-icons": "^5.11.1",
    "@fortawesome/react-fontawesome": "^0.1.4",
    "@types/selenium-webdriver": "^4.0.9",
    "axios": "^0.19.0",
    "babel-jest": "^25.4.0",
    "babel-preset-gatsby": "^0.3.6",
    "chromedriver": "^81.0.0",
    "components": "1.0.0",
    "core-js": "2.6.5",
    "dotenv": "^8.2.0",
    "formik": "^2.1.4",
    "gatsby": "^2.24.63",
    "gatsby-image": "^2.2.20",
    "gatsby-plugin-google-analytics": "^2.1.37",
    "gatsby-plugin-layout": "^1.1.10",
    "gatsby-plugin-manifest": "^2.2.18",
    "gatsby-plugin-netlify-cms": "^4.2.2",
    "gatsby-plugin-offline": "^3.2.17",
    "gatsby-plugin-react-helmet": "^3.1.8",
    "gatsby-plugin-sharp": "^2.2.25",
    "gatsby-plugin-sitemap": "^2.2.27",
    "gatsby-plugin-typescript": "^2.3.5",
    "gatsby-source-filesystem": "^2.1.26",
    "gatsby-transformer-csv": "^2.1.10",
    "gatsby-transformer-remark": "^2.6.26",
    "gatsby-transformer-sharp": "^2.2.16",
    "geckodriver": "^1.19.1",
    "identity-obj-proxy": "^3.0.0",
    "iedriver": "^3.14.2",
    "json-stringify-safe": "^5.0.1",
    "minimatch": "^3.0.4",
    "mongoose": "^5.9.5",
    "msedgedriver": "^82.0.0",
    "netlify-cms-app": "^2.12.7",
    "netlify-lambda": "^1.6.3",
    "nodemailer": "^6.4.10",
    "operadriver": "^1.0.0",
    "prop-types": "^15.7.2",
    "react": "^16.9.0",
    "react-animated-css": "^1.2.1",
    "react-animated-css-onscroll": "^1.2.1",
    "react-dom": "^16.9.0",
    "react-helmet": "^6.0.0",
    "react-modal": "^3.10.1",
    "react-parallax": "^2.2.3",
    "react-particles-js": "^2.7.0",
    "react-responsive-carousel": "^3.1.50",
    "react-select": "^3.1.0",
    "react-share": "^4.2.0",
    "react-test-renderer": "^16.13.1",
    "react-toastify": "^5.4.0",
    "react-visibility-sensor": "^5.1.1",
    "reflect-metadata": "^0.1.13",
    "selenium-webdriver": "^4.0.0-alpha.7"
  },
  "devDependencies": {
    "@babel/plugin-proposal-class-properties": "^7.10.1",
    "@babel/preset-env": "^7.9.5",
    "@babel/preset-react": "^7.9.4",
    "@babel/preset-typescript": "^7.9.0",
    "@types/jest": "^25.2.1",
    "@types/react-helmet": "^6.0.0",
    "@types/react-select": "^3.0.14",
    "babel-plugin-remove-graphql-queries": "^2.9.5",
    "babel-preset-react-app": "^9.1.2",
    "eslint": "^6.8.0",
    "eslint-config-standard": "^14.1.1",
    "eslint-plugin-import": "^2.20.2",
    "eslint-plugin-node": "^11.1.0",
    "eslint-plugin-promise": "^4.2.1",
    "eslint-plugin-react": "^7.19.0",
    "eslint-plugin-standard": "^4.0.1",
    "ts-jest": "^25.4.0",
    "typescript": "^3.8.3",
    "typescript-plugin-css-modules": "^2.3.0"
  }
}

gatsby-config.js

module.exports = {
  siteMetadata: {
    ...
  },
  plugins: [
    {
      resolve: `gatsby-plugin-google-analytics`,
      options: {
        trackingId: "UA-160003567-1",
      },
    },
    {
      resolve: `gatsby-plugin-layout`,
      options: {
        component: require.resolve(`./src/components/Layout/Layout.tsx`),
      },
    },
    {
      resolve: `gatsby-plugin-manifest`,
      options: {
        name: `Nector Telecom`,
        short_name: `Nector`,
        description: `Search for internet, TV, and phone plans`,
        lang: `en`,
        start_url: `/`,
        background_color: `#1F1F1F`,
        theme_color: `#FBB03B`,
        display: `minimal-ui`,
        icon: `src/images/nector-icon.png`, // This path is relative to the root of the site.
      },
    },
    {
      resolve: `gatsby-plugin-netlify-cms`,
      options: {
        modulePath: `${__dirname}/src/cms/cms.js`
      },
    },
    `gatsby-plugin-offline`,
    `gatsby-plugin-react-helmet`,
    `gatsby-plugin-sitemap`,
    `gatsby-plugin-sharp`,
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        name: `src`,
        path: `${__dirname}/src/`,
      },
    },
    {
      resolve: `gatsby-transformer-csv`,
      options: {
        delimiter: ['|'],
      },
    },
    `gatsby-transformer-remark`,
    `gatsby-transformer-sharp`,
  ],
}

0 个答案:

没有答案