I tried to run demo1 & demo2 in React but after the "yarn install", I have this error (for both demos) :
TypeScript error in F:/myProject/metronic/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("F:/myProject/metronic/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 | </span>
15 | )
16 | }
Am I missing some steps/dependencies install ?
Hi Dorian,
Could you please follow the installation docs: https://preview.keenthemes.com/metronic8/react/docs/docs/quick-start. It should help you to avoid this issue.
Regards,
Keenthemes support