Gatsby-plugin-breadcrumb issue

Hi! For a project build in gatsby and deployed under eyewearconcept-stg.netlify.app we are having an issue in the compilation after adding the plugin gatsby-plugin-breadcrumb, exclusively in netlify (in local the deployment is working fine).
The error we are seeing is:
6:31:37 PM: failed Building static HTML for pages - 5.002s
6:31:37 PM: error Building static HTML failed for path β€œ/en/DDIORDCB2M54/”
6:31:37 PM: 35 | var _useBreadcrumb = (0, _useBreadcrumb2.default)({
6:31:37 PM: 36 | location: (0, _extends2.default)({}, location, {
6:31:37 PM: > 37 | pathname: usePathPrefix ? location.pathname.replace(new RegExp(β€œ^” + usePathPrefix), β€˜β€™) : location.pathname
6:31:37 PM: | ^
6:31:37 PM: 38 | }),
6:31:37 PM: 39 | crumbLabel: crumbLabel,
6:31:37 PM: 40 | crumbSeparator: crumbSeparator
6:31:37 PM:
6:31:37 PM: WebpackError: TypeError: Cannot read property β€˜pathname’ of undefined
6:31:37 PM:
6:31:37 PM: - click-tracking-crumb.js:37 ClickTrackingCrumb
6:31:37 PM: node_modules/gatsby-plugin-breadcrumb/components/click-tracking-crumb.js:37: 107

Seems to belong to the plugin, but as I said this is only happening in Netlify build, not in any other environment.

Issue detected, problem with the plugin configuration and the compilation profiles. Not related to any issue with Netlify or the plugin.

1 Like