Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

'SVG' cannot be used as a JSX component.

src/_metronic/helpers/components/KTSVG.tsx src/_metronic/helpers/components/KTSVG.tsx(13,8):

'SVG' cannot be used as a JSX component. Its instance type 'InlineSVG' is not a valid JSX element. The types returned by 'render()' are incompatible between these types. Type 'React.ReactNode' is not assignable to type 'import("node_modules/react-intl/node_modules/@types/react/index").ReactNode'. Type '{}' is not assignable to type 'ReactNode'. TS2786

11 |   return (
12 |     <span className={`svg-icon ${className}`}>

13 | <SVG src={toAbsoluteUrl(path)} className={svgClassName} /> | ^ 14 | 15 | ) 16 | }

I got this problem when run yarn start

I use the React Demo 3

Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (5)


geometry dash online is mostly a single-player game, but it also has social elements that enhance the entire experience.



Hi,

Try to follow the instalation doc: https://preview.keenthemes.com/metronic8/react/docs/docs/quick-start. It should help to fix this issue.

Regards,
Keenthemes support



It's working. But how about if I change the libraries (adding more)? The lock file will be changed. Could you let me know what the problems are?

Thanks.



Hi,

The problem is React published v18 without backward compatibilities with v17. And first, we have to upgrade React version of our app.
Our developers have already done it and this release will be published early next week.

Regards,
Keenthemes support


Your Support Matters!

We will highly appreciate your Metronic Review on Themeforest.
Please go to Themeforest Downloads page, select Metronic & leave your feedback.

Thank you,
Hopefully, I will have that built as soon as possible. Now it's risky to start with the current version for my team.


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(