react-native-svg icon indicating copy to clipboard operation
react-native-svg copied to clipboard

SVG image not import in React native

Open wolfxpertlab opened this issue 1 year ago • 1 comments

Screenshot 2024-04-20 at 10 16 14 AM

My All svg image not show path that show error is

Cannot find module '../assets/svg/dashboardcart.svg' or its corresponding type declarations.

how can I solved it please help when I think that show error after installing firebase app and firestore before work better without install firebase

my declaration.d.ts file is:

declare module "*.svg" { import React = require("react"); const ReactComponent: React.FC<React.SVGProps<SVGSVGElement>>; export default ReactComponent; }

my tsconfige file is:

{ "compilerOptions": { "jsx": "react-jsx", "lib": ["DOM", "ES2022"], "moduleResolution": "node", "target": "ES2022" }, "include": ["src/types/declarations.d.ts","declarations.d.ts"], "files": ["declarations.d.ts"], "extends": "@react-native/typescript-config/tsconfig.json" }

wolfxpertlab avatar Apr 20 '24 04:04 wolfxpertlab

+1

rodrigodiasf1984 avatar May 10 '24 09:05 rodrigodiasf1984

i've solve the problem with this: image

rodrigodiasf1984 avatar May 14 '24 08:05 rodrigodiasf1984

Hello @wolfxpertlab, Do you still have that issue? As I see it can be the problem with typescript configuration. If you still have that issue, Can you share a simple example to reproduce that issue? Thank you.

bohdanprog avatar Jun 11 '24 18:06 bohdanprog