Closed kalwalt closed 1 year ago
The build process fails but last commit is not the reason (in detail uninstall react-photo-gallery). i got the same error also before.
error Truncated page data information for the failed page "/en/tags/web/": {
11:07:12 PM: "errors": {},
11:07:12 PM: "path": "/en/tags/web/",
11:07:12 PM: "slicesMap": {},
11:07:12 PM: "pageContext": {
11:07:12 PM: "tag": "web",
11:07:12 PM: "langKey": "en"
11:07:12 PM: }
11:07:12 PM: }
11:07:12 PM: failed Building static HTML for pages - 8.725s
11:07:12 PM: error Building static HTML failed for path "/en/tags/web/"
11:07:12 PM:
11:07:12 PM: 63 | export function defineProperty(target, name, _a) {
11:07:12 PM: 64 | var value = _a.value;
11:07:12 PM: > 65 | Object.defineProperty(target, name, {
11:07:12 PM: | ^
11:07:12 PM: 66 | configurable: true,
11:07:12 PM: 67 | enumerable: false,
11:07:12 PM: 68 | writable: true,
11:07:12 PM:
11:07:12 PM: WebpackError: Element type is invalid: expected a string (for built-in compone nts) or a class/function (for composite components) but got: undefined.
11:07:12 PM:
11:07:12 PM: - utils.js:65
11:07:12 PM: [gatsby-starter-i18n-bulma]/[@formatjs]/ecma402-abstract/lib/utils.js:65:1
11:07:12 PM:
11:07:12 PM: - utils.js:66
11:07:12 PM: [gatsby-starter-i18n-bulma]/[@formatjs]/ecma402-abstract/lib/utils.js:66:1
11:07:12 PM:
11:07:12 PM: - utils.js:69
11:07:12 PM: [gatsby-starter-i18n-bulma]/[@formatjs]/ecma402-abstract/lib/utils.js:69:1
11:07:12 PM:
11:07:12 PM: - utils.js:61
11:07:12 PM: [gatsby-starter-i18n-bulma]/[@formatjs]/ecma402-abstract/lib/utils.js:61:52
11:07:12 PM:
11:07:12 PM: - utils.js:66
11:07:12 PM: [gatsby-starter-i18n-bulma]/[@formatjs]/ecma402-abstract/lib/utils.js:66:1
11:07:12 PM:
11:07:12 PM: - utils.js:69
11:07:12 PM: [gatsby-starter-i18n-bulma]/[@formatjs]/ecma402-abstract/lib/utils.js:69:1
11:07:12 PM:
11:07:12 PM: - utils.js:68
11:07:12 PM: [gatsby-starter-i18n-bulma]/[@formatjs]/ecma402-abstract/lib/utils.js:68:1
11:07:12 PM:
11:07:12 PM: - utils.js:66
11:07:12 PM: [gatsby-starter-i18n-bulma]/[@formatjs]/ecma402-abstract/lib/utils.js:66:1
11:07:12 PM:
11:07:12 PM: - utils.js:69
11:07:12 PM: [gatsby-starter-i18n-bulma]/[@formatjs]/ecma402-abstract/lib/utils.js:69:1
11:07:12 PM:
11:07:12 PM: - utils.js:61
11:07:12 PM: [gatsby-starter-i18n-bulma]/[@formatjs]/ecma402-abstract/lib/utils.js:61:52
11:07:12 PM:
11:07:12 PM: - utils.js:66
11:07:12 PM: [gatsby-starter-i18n-bulma]/[@formatjs]/ecma402-abstract/lib/utils.js:66:1
11:07:12 PM:
11:07:12 PM: - utils.js:69
11:07:12 PM: [gatsby-starter-i18n-bulma]/[@formatjs]/ecma402-abstract/lib/utils.js:69:1
11:07:12 PM:
11:07:12 PM: - utils.js:68
11:07:12 PM: [gatsby-starter-i18n-bulma]/[@formatjs]/ecma402-abstract/lib/utils.js:68:1
11:07:12 PM:
11:07:12 PM: - utils.js:66
11:07:12 PM: [gatsby-starter-i18n-bulma]/[@formatjs]/ecma402-abstract/lib/utils.js:66:1
11:07:12 PM:
11:07:12 PM: - utils.js:69
11:07:12 PM: [gatsby-starter-i18n-bulma]/[@formatjs]/ecma402-abstract/lib/utils.js:69:1
11:07:12 PM:
11:07:12 PM: - utils.js:61
11:07:12 PM: [gatsby-starter-i18n-bulma]/[@formatjs]/ecma402-abstract/lib/utils.js:61:52
11:07:12 PM:
11:07:12 PM:
11:07:12 PM:
11:07:12 PM: "build.command" failed
11:07:12 PM: ────────────────────────────────────────────────────────────────
11:07:12 PM:
11:07:12 PM: Error message
11:07:12 PM: Command failed with exit code 1: gatsby build (https://ntl.fyi/exit-code-1)
11:07:12 PM:
11:07:12 PM: Error location
11:07:12 PM: In Build command from Netlify app:
11:07:12 PM: gatsby build
maybe i need to upgrade react-intl package?
I solved the gatsby build issue with commit https://github.com/kalwalt/gatsby-starter-i18n-bulma/pull/221/commits/abf3f8113d33b03e80df1262fa0bbc51421e707a, it was caused by code not updated to a new syntax, when importing a Link instead of:
import Link from 'gatsby-link'
it should be:
import { Link } from 'gatsby'
same for:
import { navigate } from 'gatsby-link'
but instead use:
import { navigate } from 'gatsby'
probably react-photo-gallery do not cause any issue, but i will check.
This PR upgrade the project to gatsby v5. I followed the migrating guide here: https://www.gatsbyjs.com/docs/reference/release-notes/migrating-from-v4-to-v5/ Apart upgrading gatsby packages this PR also fix some import's. In detail:
see commit https://github.com/kalwalt/gatsby-starter-i18n-bulma/pull/221/commits/abf3f8113d33b03e80df1262fa0bbc51421e707a While upgrading i had also a css alignment issue with the menu bar see commits https://github.com/kalwalt/gatsby-starter-i18n-bulma/pull/221/commits/f897b50bdf2775b9e1b4ed6c1c3a58bb7cac6b64 https://github.com/kalwalt/gatsby-starter-i18n-bulma/pull/221/commits/540df5a1d1b4157d3ca66bd5b9759ed1b26766b1