Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Unable to resolve module ./RNVectorHelper from node_modules/react-native-shine-button/js/RNShineButton.js #27

Open
anshul-gour-emids opened this issue Apr 29, 2020 · 3 comments

Comments

@anshul-gour-emids
Copy link

Getting this error and also it seems like you have been replaced the 'RNVectorHelper' as per your commit message. But Unable to find the changes in your RNShinButton.js file.

@mqtik
Copy link

mqtik commented Oct 16, 2020

Also experiencing this.
Is this still maintained?

@LahmerIlyas
Copy link

It seems that this library is no longer maintained, I suggest not to use it.

@noumansakhawat-dev
Copy link

@anshul-android
here is RNVectorHelper.js
`import EntypoGlyphMap from "react-native-vector-icons/glyphmaps/Entypo.json";
import EvilIconsGlyphMap from "react-native-vector-icons/glyphmaps/EvilIcons.json";
import FeatherGlyphMap from "react-native-vector-icons/glyphmaps/Feather.json";
import FontAwesomeGlyphMap from "react-native-vector-icons/glyphmaps/FontAwesome.json";
import FoundationGlyphMap from "react-native-vector-icons/glyphmaps/Foundation.json";
import IoniconsGlyphMap from "react-native-vector-icons/glyphmaps/Ionicons.json";
import MaterialCommunityIconsGlyphMap from "react-native-vector-icons/glyphmaps/MaterialCommunityIcons.json";
import MaterialIconsGlyphMap from "react-native-vector-icons/glyphmaps/MaterialIcons.json";
import OcticonsGlyphMap from "react-native-vector-icons/glyphmaps/Octicons.json";
import SimpleLineIconsGlyphMap from "react-native-vector-icons/glyphmaps/SimpleLineIcons.json";
import ZocialGlyphMap from "react-native-vector-icons/glyphmaps/Zocial.json";

class RNVectorHelper {
static Resolve(family, name) {
let glyph;

    switch (family) {
        case "Entypo":
            glyph = EntypoGlyphMap[name];
            if (typeof glyph === "number") {
                glyph = String.fromCharCode(glyph);
            }

            return glyph;
        case "EvilIcons":
            glyph = EvilIconsGlyphMap[name];
            if (typeof glyph === "number") {
                glyph = String.fromCharCode(glyph);
            }

            return glyph;
        case "Feather":
            glyph = FeatherGlyphMap[name];
            if (typeof glyph === "number") {
                glyph = String.fromCharCode(glyph);
            }

            return glyph;
        case "FontAwesome":
            glyph = FontAwesomeGlyphMap[name];
            if (typeof glyph === "number") {
                glyph = String.fromCharCode(glyph);
            }

            return glyph;
        case "Foundation":
            glyph = FoundationGlyphMap[name];
            if (typeof glyph === "number") {
                glyph = String.fromCharCode(glyph);
            }

            return glyph;
        case "Ionicons":
            glyph = IoniconsGlyphMap[name];
            if (typeof glyph === "number") {
                glyph = String.fromCharCode(glyph);
            }

            return glyph;
        case "MaterialCommunityIcons":
            glyph = MaterialCommunityIconsGlyphMap[name];
            if (typeof glyph === "number") {
                glyph = String.fromCharCode(glyph);
            }

            return glyph;
        case "MaterialIcons":
            glyph = MaterialIconsGlyphMap[name];
            if (typeof glyph === "number") {
                glyph = String.fromCharCode(glyph);
            }

            return glyph;
        case "Octicons":
            glyph = OcticonsGlyphMap[name];
            if (typeof glyph === "number") {
                glyph = String.fromCharCode(glyph);
            }

            return glyph;
        case "SimpleLineIcons":
            glyph = SimpleLineIconsGlyphMap[name];
            if (typeof glyph === "number") {
                glyph = String.fromCharCode(glyph);
            }

            return glyph;
        case "Zocial":
            glyph = ZocialGlyphMap[name];
            if (typeof glyph === "number") {
                glyph = String.fromCharCode(glyph);
            }

            return glyph;
    }
}

}
export default RNVectorHelper;`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants