我正在 Netlify 中部署一个 Gatsby-shopify-starter,我收到了这个错误:
error Truncated page data information for the failed page
有人知道调试这个吗?
这是我的 Package.json
{
"name": "gatsby-starter-shopify",
"version": "1.0.0",
"private": true,
"description": "A Gatsby starter using the latest Shopify plugin showcasing a store with product overview, individual product pages, and a cart.",
"author": "LekoArts <[email protected]>",
"license": "0BSD",
"keywords": [
"gatsby",
"shopify",
"starter",
"ecommerce",
"e-commerce"
],
"scripts": {
"develop": "gatsby develop",
"start": "gatsby develop",
"build": "gatsby build",
"serve": "gatsby serve",
"clean": "gatsby clean"
},
"dependencies": {
"@sindresorhus/slugify": "^1.1.0",
"debounce": "^1.2.1",
"deepmerge": "^4.3.1",
"dotenv": "^10.0.0",
"gatsby": "^5.0.0",
"gatsby-plugin-gatsby-cloud": "^5.0.0",
"gatsby-plugin-google-analytics": "^5.0.0",
"gatsby-plugin-image": "^3.0.0",
"gatsby-plugin-netlify": "^5.1.0",
"gatsby-plugin-sharp": "^5.0.0",
"gatsby-plugin-sitemap": "^6.0.0",
"gatsby-source-filesystem": "^5.0.0",
"gatsby-source-shopify": "^6.0.0",
"gatsby-transformer-sharp": "^5.0.0",
"isomorphic-fetch": "^3.0.0",
"lodash.debounce": "^4.0.8",
"lodash.isequal": "^4.5.0",
"query-string": "^7.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-icons": "^4.1.0",
"shopify-buy": "^2.11.0",
"styled-components": "^5.3.9",
"urql": "^2.0.2"
}
}
这是我的 gatsby-config.js 文件
require("dotenv").config()
module.exports = {
siteMetadata: {
siteTitle: "gatsby-starter-shopify",
siteTitleDefault: "gatsby-starter-shopify by @GatsbyJS",
siteUrl: "https://shopify-demo.gatsbyjs.com",
siteDescription:
"A Gatsby starter using the latest Shopify plugin showcasing a store with product overview, individual product pages, and a cart.",
siteImage: "/default-og-image.jpg",
twitter: "@gatsbyjs",
},
plugins: [
{
resolve: "gatsby-source-shopify",
options: {
password: process.env.SHOPIFY_SHOP_PASSWORD,
storeUrl: process.env.GATSBY_SHOPIFY_STORE_URL,
shopifyConnections: ["collections"],
},
},
"gatsby-plugin-image",
"gatsby-plugin-sharp",
"gatsby-transformer-sharp",
"gatsby-plugin-sitemap",
"gatsby-plugin-gatsby-cloud",
// Add your Google Analytics ID to the .env file to enable
// Otherwise, this plugin can be removed
process.env.GOOGLE_ANALYTICS_ID && {
resolve: "gatsby-plugin-google-analytics",
options: {
trackingId: process.env.GOOGLE_ANALYTICS_ID,
},
},
].filter(Boolean),
}
我尝试使用 yarn 和 npm --legacy-peer-deps 安装依赖项,我还添加了环境变量 NPM_FLAGS = '--legacy-peer-deps' 和 NODE_VERSION = '18.0.0' 到 netlify 但没有工作,错误仍然存在于 Netlify 中,本地构建中没有错误