Closed NickyMeuleman closed 1 year ago
ERROR #95313
Building static HTML failed for path "/blog/multilanguage-codeblocks"
See our docs page for more info on this error: https://gatsby.dev/debug-html
95 | {...defaultProps} 96 | {...props}
97 | code={codeString.trim()} | ^ 98 | // supported languages: https://github.com/FormidableLabs/prism-react-renderer/blob/master/src/vendor/prism/includeLangs.js 99 | language={lang as Language} 100 | theme={undefined}
WebpackError: TypeError: Cannot read properties of undefined (reading 'trim')
Codestring is not available during buildtime, and trim gets called on undefined.
trim
undefined
Hint: default it to an empty string in components/MultiLangCode.js
components/MultiLangCode.js
the same logic is also used in the Layout component. I suspect the same error happens there too
ERROR #95313
Building static HTML failed for path "/blog/multilanguage-codeblocks"
See our docs page for more info on this error: https://gatsby.dev/debug-html
95 | {...defaultProps} 96 | {...props}
WebpackError: TypeError: Cannot read properties of undefined (reading 'trim')
Codestring is not available during buildtime, and
trim
gets called onundefined
.Hint: default it to an empty string in
components/MultiLangCode.js