Gatsby 5 doesn't work with svgr #38346
Unanswered
Karol-Waliszewski
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Preliminary Checks
Description
Gatsby 5 doesn't work with SVGR. When I try to load the page with some svg the render breaks on dev. The problem only appears when reloading the page or entering from url. If going from another page everything works fine.
Reproduction Link
...
Steps to Reproduce
Expected Result
Page renders
Actual Result
Failed to Server Render (SSR)
Error message:
React.Children.only expected to receive a single React element child.
File:
src/assets/icons/flat-floor.svg:1:1
Stack:
WebpackError: React.Children.only expected to receive a single React element child.
at victoriadom/src/assets/icons/flat-floor.svg:1:1
at victoriadom/node_modules/styled-components/dist/styled-components.esm.js:1:13872
at victoriadom/node_modules/css-select/lib/pseudo-selectors/subselects.js:105:1
at victoriadom/node_modules/css-select/lib/sort.js:57:1
at victoriadom/node_modules/css-select/node_modules/dom-serializer/lib/index.js:62:1
at victoriadom/src/utils/getIcon.ts:222:10
at victoriadom/node_modules/css-select/node_modules/dom-serializer/lib/index.js:192:1
at victoriadom/node_modules/css-select/node_modules/dom-serializer/lib/index.js:36:1
at victoriadom/node_modules/css-select/node_modules/dom-serializer/lib/index.js:133:1
at victoriadom/src/utils/getIcon.ts:222:10
Environment
Config Flags
FAST_DEV: true,
PARALLEL_SOURCING: true,
Beta Was this translation helpful? Give feedback.
All reactions