Error building project: Page data from page-data.json for the failed page "/faq"
zaheeratwork opened this issue · comments
I am getting the following error when trying to build the project locally or when I try to deploy using Netlify.
success Writing page-data.json files to public directory - 0.014s - 1/2 140.31/s
ERROR
Page data from page-data.json for the failed page "/faq": {
"componentChunkName": "component---src-templates-mdx-js",
"path": "/faq",
"result": {
"data": {
"mdx": {
"id": "c4a8d6e2-5440-5ac9-9f65-723437a2e2b3",
"body": "var _excluded = [\"components\"];\n\nfunction _extends() { _extends = Object.assign ?
Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for
(var key in source) { if (Object.prototype.has...",
"frontmatter": {
"title": "Frequently Asked Questions"
}
}
},
"pageContext": {
"id": "c4a8d6e2-5440-5ac9-9f65-723437a2e2b3"
}
},
"staticQueryHashes": [
"3649515864",
"3933656037",
"63159454"
]
}
failed Building static HTML for pages - 6.753s
ERROR #95313
Building static HTML failed for path "/faq"
See our docs page for more info on this error: https://gatsby.dev/debug-html
WebpackError: TypeError: merge is not a function (from plugin: gatsby-plugin-react-helmet)
- static-entry.js:103
webpack:/gatsby-starter-medusa/.cache/static-entry.js:103:10
- static-entry.js:168
webpack:/gatsby-starter-medusa/.cache/static-entry.js:168:24
- gatsby-ssr.js:17
[gatsby-starter-medusa]/[gatsby-plugin-react-helmet]/gatsby-ssr.js:17:5
- api-runner-ssr.js:60
webpack:/gatsby-starter-medusa/.cache/api-runner-ssr.js:60:22
- api-runner-ssr.js:53
webpack:/gatsby-starter-medusa/.cache/api-runner-ssr.js:53:11
- static-entry.js:303
webpack:/gatsby-starter-medusa/.cache/static-entry.js:303:5
- dev-404-page.js:15
gatsby-starter-medusa/.cache/dev-404-page.js:15:11
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! gatsby-starter-medusa@2.0.0 build: `gatsby build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the gatsby-starter-medusa@2.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\zaheerbaloch.LAPTOP-AESVTSPA\AppData\Roaming\npm-cache\_logs\2022-06-21T01_23_13_163Z-debug.log
hey @zaheeratwork, seems that updating gatsby-plugin-react-helmet
to ^5.17.0
solves the issue
Updating gatsby-plugin-react-helmet
to ^5.17.0
did not work for me but adding deepmerge
as a dependency solved it. Solution based on this comment.
Adding deepmerge solved the issue for me when building medusaj gatsby front service in a docker container