Skip to content

Fix: Incorrect import path for LocalSvg in react-native-qrcode-svg #234

@danielramireze

Description

@danielramireze

Hi! 👋

Today I used patch-package to patch [email protected] for the project I'm working on.

I encountered an issue while using [email protected] in my project. The import path for LocalSvg in the LogoSVG component appears to be incorrect. It is currently importing from react-native-svg/css, which causes an error. According to the react-native-svg documentation, LocalSvg should be imported directly from react-native-svg.

Proposed solution:

I made a small change to fix the import path in src/LogoSVG/index.native.js:

diff --git a/node_modules/react-native-qrcode-svg/src/LogoSVG/index.native.js b/node_modules/react-native-qrcode-svg/src/LogoSVG/index.native.js
index 6c5b14a..e1b5e5a 100644
--- a/node_modules/react-native-qrcode-svg/src/LogoSVG/index.native.js
+++ b/node_modules/react-native-qrcode-svg/src/LogoSVG/index.native.js
@@ -1,5 +1,5 @@
 import React from "react";
-import { LocalSvg } from "react-native-svg/css";
+import { LocalSvg } from 'react-native-svg'; 
 import { SvgUri, SvgXml } from "react-native-svg";
 import { isString, isUrlString } from "../utils";
 

This issue body was partially generated by patch-package.

This resolved the issue and everything now works as expected.

Hope this helps

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions