Skip to content

Incorrect import "react-native-svg/css" for React Native #237

@cratag

Description

@cratag

In src/LogoSVG/index.native.js we currently import react-native-svg/css with the following line:
import { LocalSvg } from "react-native-svg/css";

However react-native-svg package does not have that folder which makes the app crash in React Native environments. Simply changing the line from
import { LocalSvg } from "react-native-svg/css";
to
import { LocalSvg } from "react-native-svg";
worked for me.

I usedpatch-package to make the fix persist in my repo.

[Error: undefined Unable to resolve module react-native-svg/css from /Users/lucasmanuelfaner/dev/venueapp-mobile/node_modules/react-native-qrcode-svg/src/LogoSVG/index.native.js: react-native-svg/css could not be found within the project or in these directories:
node_modules/react-native-qrcode-svg/node_modules
node_modules
1 | import React from "react";

2 | import { LocalSvg } from "react-native-svg/css";
| ^

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