expo / vector-icons

https://icons.expo.fyi
MIT License
650 stars 113 forks source link

Latest react-native-vector-icons & Fontisto Font Bundle #112

Closed WrathChaos closed 4 years ago

WrathChaos commented 4 years ago

Is that possible to upgrade the version with latest react-native-vector-icon with Fontisto Font Bundle?

wmortume commented 4 years ago

@WrathChaos I have the latest version of react-native-vector-icon with fontisto but for some reason, the project tries to find fontisto from @expo/vector-icons. How would I import @expo/vector-icons after forking the repository and modifying it in a pr?

WrathChaos commented 4 years ago

You can either import it with a local library or publish it with npm

wmortume commented 4 years ago

I'm not sure what to modify. This repo has a few font directory references. Best to wait for expo to add fontisto to their next update unless someone else has a workaround for expo + fontisto.

WrathChaos commented 4 years ago

I will work on it this weekend

toniastro commented 4 years ago

Hello @WrathChaos . I seem to be having the same issue with Fonisto not been found. Is there any work-around for this? Thanks

WrathChaos commented 4 years ago

Hello @Iamt-chadwick, Unfortunately, I could not spend time to explore expo's vector-icons library. It should have been easy to add a new bundle but I could not find a very easy way.

toniastro commented 4 years ago

Alright. Thanks a lot.

ziedjebali commented 4 years ago

Any news with regards to this?

Monty1337 commented 4 years ago

I have the same problem, any update? I cant use NativeBase with Expo right now because of this issue.

zacviandier commented 4 years ago

I came to that issue for the same reason @Monty1337 , I can't use NativeBase with Expo for now with the last version. I downgraded NativeBase to 2.13.8.

dernster commented 4 years ago

I'm experiencing the same issue. Had to downgrade to NativeBase 2.13.8 but it has some warnings about deprecated lifecycle methods....

tsmuse commented 4 years ago

I also just ran into this issue trying to use NativeBase. Any word on a fix for this?

nadernt commented 4 years ago

I have the same issue. My App shows red crash screen. Any change to be fixed soon?

singamnv commented 4 years ago

native-base not working for me either.

I keep getting a Unable to resolve "@expo/vector-icons/Fontisto" from "node_modules/native-base/dist/src/basic/IconNB.js"

I've installed expo-fonts like 5 different methods. No avail. Only happens when I try to import native-base into my app.

diegolaciar commented 4 years ago

Same here:

Could not resolve "@expo/vector-icons/Fontisto" in file /Users/***/workspace/***********/node_modules/native-base/dist/src/basic/IconNB.js. Unable to resolve "@expo/vector-icons/Fontisto" from "node_modules/native-base/dist/src/basic/IconNB.js" Failed building JavaScript bundle.

ariyas commented 4 years ago

same here, got this issue when trying to run a react native project

Unable to resolve "@expo/vector-icons/Fontisto" from "node_modules\native-base\dist\src\basic\IconNB.js"

undefined Unable to resolve module @expo/vector-icons/Fontisto from node_modules\native-base\dist\src\basic\IconNB.js: @expo/vector-icons/Fontisto could not be found within the project.

nadernt commented 4 years ago

I downgraded to version 2.13.7 now I can continue development but defiantly the latest version is broken and shows the Unable to resolve "@expo/vector-icons/Fontisto" from "node_modules\native-base\dist\src\basic\IconNB.js". I tried to give the absolute path to IconNB.js but it is not working too.

r-0-0-t commented 4 years ago

I downgraded the version to 2.13.7 but still getting the issue.

Unable to resolve "@expo/vector-icons/Fontisto" from "node_modules\native-base\dist\src\basic\IconNB.js". any workarounds regards to this?

r-0-0-t commented 4 years ago

I changed my babel.config.js into

module.exports = function(api) {
    api.cache(true);
    return {
        presets: ["module:metro-react-native-babel-preset"]
    };

and voila, everything seemed to working again

ntbosscher commented 4 years ago

I downgraded to version 2.13.7 now I can continue development but defiantly the latest version is broken and shows the Unable to resolve "@expo/vector-icons/Fontisto" from "node_modules\native-base\dist\src\basic\IconNB.js". I tried to give the absolute path to IconNB.js but it is not working too.

It looks like native-base@2.13.8 is the last working version

amar1n commented 4 years ago

@ntbosscher, the problem remains with version 2.13.8

ntbosscher commented 4 years ago

@ntbosscher, the problem remains with version 2.13.8

@amar1n

hmm, that's odd b/c mine breaks with 2.13.9, but not with 2.13.8. I'm getting the same exception message as others in this ticket.

Exception message

Unable to resolve "@expo/vector-icons/Fontisto" from "node_modules/native-base/dist/src/basic/IconNB.js" Failed building JavaScript bundle

This is an excerpt from my yarn.lock file

native-base@2.13.8:
  version "2.13.8"
  resolved "https://registry.yarnpkg.com/native-base/-/native-base-2.13.8.tgz#817dfaf74ec63cd17f48991fab452fdc75103db9"
  integrity sha512-47Wm7bjH5Dc99gBUeVvsURyADU97aiLMLPGX4ewPgR9kW47TD9slS/Y5vGMToBgz1bsku9anXgN2T1rpdQbpFA==
amar1n commented 4 years ago

Every works fine with native-base: 2.13.8

The problem appears in version ^2.13.8 and remains until 2.13.12

Unable to resolve module @expo/vector-icons/Fontisto from .../node_modules/native-base/dist/src/basic/IconNB.js: Module @expo/vector-icons/Fontisto does not exist in the Haste module map

amar1n commented 4 years ago

In short, what you need to install is the exact 2.13.8 version

npm i --save-exact native-base@2.13.8

selmi-karim commented 4 years ago

any updates?

timosur commented 4 years ago

works for me @amar1n :-) thanks!

MuhweziDeo commented 4 years ago

thanks @amar1n this also worked for me

rrust commented 4 years ago

Updating @expo/vector-icons according to the latest native-base package would be great, since babel-preset-expo aliases react-native-vector-icons to @expo/vector-icons

 if (hasModule('@expo/vector-icons')) {
    aliases['react-native-vector-icons'] = '@expo/vector-icons';
 }

so if a library depends on a newer version of react-native-vector-icons then @expo/vector-icons we're getting that "Unable to resolve" error...

Monty1337 commented 4 years ago

I currently see this as a workaround, but should definitely be fixed.

rrust commented 4 years ago

Just to let everyone know....

To work around this issue I simply created a yarn postinstall hook in my package.json which copies an existing Font*.js wrapper file from @expo/vector-icons

"scripts": {
    "start": "expo start",
    "postinstall": "cp node_modules/@expo/vector-icons/FontAwesome.js node_modules/@expo/vector-icons/Fontisto.js"
  }

obviously this is to be removed once @expo/vector-icons is updated...

joshg2k commented 4 years ago

Commenting here to show my support for resolving this issue.

SeanRenet commented 4 years ago

I literally just duplicated Ionicons.js into a new file called Fontisto.js. That took away the error. Anyone have a real fix yet?

webbudesign commented 4 years ago

I had the same problem and solved it after install v2.13.8

afrojuju1 commented 4 years ago

I am having this issue with version 2.13.8

YeisonGomez commented 4 years ago

It works for me, however, the icons in the app no ​​longer work

raffaeu commented 4 years ago

The bug is still there, I had version 2.13.12 of native-base and went back to 2.13.8 Come'n guys or you fix it or you pass the repo to someone else, this is a basic dependency for native-base

cruzach commented 4 years ago

This should be resolved by https://github.com/expo/vector-icons/pull/126

avinaash-sharma commented 4 years ago

https://github.com/oblador/react-native-vector-icons/issues/1031

this worked for me..

Jerry-devblog commented 4 years ago

Not working with react-native-elements tho

do this as above

cp node_modules/@expo/vector-icons/FontAwesome.js node_modules/@expo/vector-icons/Fontisto.js

adarshkhatri commented 4 years ago

same problem here.

UPDATE expo install did the trick for me.

tonyea commented 4 years ago

It's working fine on 2.13.12 and expo ^38.0.0