Code Monkey home page Code Monkey logo

Comments (25)

Victor-Varghese avatar Victor-Varghese commented on June 11, 2024 8

UPDATE

I started the upgrade process from scratch and it worked. Icons was working on ios and android without any workarounds.

Link: https://docs.expo.dev/workflow/upgrading-expo-sdk-walkthrough/

npm install expo@latest
npx expo install --fix

Related: expo/expo#27602

from react-native-paper.

drcodemonster avatar drcodemonster commented on June 11, 2024 3

@benjaminkomen thanks for the clue.. I slightly changed your code and it works!!
For those having similar issue edit your babel.congif.js file as this one:

module.exports = function (api) {
  api.cache(true)
  return {
    presets: ['babel-preset-expo'],
    plugins: [
      'nativewind/babel',
      'react-native-reanimated/plugin',
      'transform-inline-environment-variables',
      [
        'module-resolver',
        {
          alias: {
            '@': './src',
            'react-native-vector-icons': '@expo/vector-icons',
          },
        },
      ],
    ],
    env: {
      production: {
        plugins: ['react-native-paper/babel'],
      },
    },
  }
}

from react-native-paper.

PavelPolyakov avatar PavelPolyakov commented on June 11, 2024 3

I did another test — created a clean app with npx create-expo-app StickerSmash and there icons were doing fine ✅

Which made me think that this bug is only present for those who upgrades.

This is what helped me at the end:

rm package-lock.json
rm bun.lockb
rm -rf node_modules
npm i 
bun i

Icons are there — back in place 🥳

from react-native-paper.

willstepp avatar willstepp commented on June 11, 2024 1

We just upgraded our app from Expo 49 to Expo 50, encountered this issue on web, but the tempfix proposed by @benjaminkomen did work 👍 (if relevant, we are using Material Theme version 2)

from react-native-paper.

pedrolmsin avatar pedrolmsin commented on June 11, 2024 1

For those who are experiencing the same issue, my icons didn't appear when I used EAS to generate my iOS build, I had to change api.cache(true) to api.cache(false), then the icons started to appear in the iOS build, my babel.conf was as follows:

module.exports = function(api) {
api.cache(false);
return {
presets: ['babel-preset-expo'],
plugins: [
[
'babel-plugin-module-resolver', {
alias: {
'react-native-vector-icons': '@expo/vector-icons',
},
}
],
],
env: {
production: {
plugins: ['react-native-paper/babel'],
},
},
};
};

from react-native-paper.

PavelPolyakov avatar PavelPolyakov commented on June 11, 2024

Thank you for creating the issue. I experience the same with import Ionicons from "@expo/vector-icons/Ionicons"; and iOS. Icons just gone, I don't see any squares even. The suggested fix did not work for me, so I had to revert to @49.

from react-native-paper.

velusoft avatar velusoft commented on June 11, 2024

Team, We are also facing same issue in React Native using Vector icons. The suggested fix did not work for us. could you please help us?

from react-native-paper.

Eliost avatar Eliost commented on June 11, 2024

Same issue here

from react-native-paper.

mattThousand avatar mattThousand commented on June 11, 2024

Experiencing the same issue

from react-native-paper.

mathias-berg avatar mathias-berg commented on June 11, 2024

I also had issue but it was solved by setting containerColor="transparent on the IconButton component. I have only tried web.

from react-native-paper.

karimessouabni avatar karimessouabni commented on June 11, 2024

same here.

from react-native-paper.

simonmaquilon avatar simonmaquilon commented on June 11, 2024

Same issue here, any fix?... I had to revert to SDK 49.

from react-native-paper.

WillSmithTE avatar WillSmithTE commented on June 11, 2024

Is this only on web everyone is experiencing this? or ios/android too?

from react-native-paper.

mazshakibaii avatar mazshakibaii commented on June 11, 2024

I'm experiencing this on iOS too.

from react-native-paper.

FloKla avatar FloKla commented on June 11, 2024

I'm experiencing this on Web too since updating to expo 50

from react-native-paper.

AnjanaDhakal avatar AnjanaDhakal commented on June 11, 2024

i am experiencing on android..

from react-native-paper.

pedrolmsin avatar pedrolmsin commented on June 11, 2024

I'm experiencing this problem with all the react-native-paper components, when I generate my iOS build with the EAS CLI all the icons are a square in place, I've tried the solutions presented above and nothing has worked, has anyone found another solution?

from react-native-paper.

kevinstevanus avatar kevinstevanus commented on June 11, 2024

any update on this?

from react-native-paper.

PavelPolyakov avatar PavelPolyakov commented on June 11, 2024

babel-plugin-module-resolver does not work for me and I still can not upgrade to v50.
In addition, when I open the screen with icons I see the next warning.

I'm confused. This issue has some regular upvotes, but it does seem that for the majority of people icons are working. How is our case different then? 🤔

Screenshot 2024-04-08 at 19 01 08

from react-native-paper.

Victor-Varghese avatar Victor-Varghese commented on June 11, 2024

Any updates?

I tried removing package-lock, and added the mentioned fix in babel.config.js. nothing works in iOS. Icons are visible on android.

upgrading from SDK 49 to 50, followed by expo install --fix

from react-native-paper.

butri71 avatar butri71 commented on June 11, 2024

Has anyone managed to get a working workaround after upgrading to v50? I see icons in iOs but nothing in Android

from react-native-paper.

JPStrydom avatar JPStrydom commented on June 11, 2024

Any updates?

I tried removing package-lock, and added the mentioned fix in babel.config.js. nothing works in iOS. Icons are visible on android.

upgrading from SDK 49 to 50, followed by expo install --fix

Unfortunately Expo 51 (current latest) requires moving away from React Navigation in favor of Expo Router in order to support web apps, which is quite a big architectural change. It would be ideal if this fix could work on Expo 50 as well, or if there could be a way to still use Expo 51 with React Navigation.

from react-native-paper.

raajnadar avatar raajnadar commented on June 11, 2024

@JPStrydom expo router under the hood uses react-navigation, make sure you guys clear the cache after the upgrade process

https://stackoverflow.com/a/72332470/5519872

from react-native-paper.

Victor-Varghese avatar Victor-Varghese commented on June 11, 2024

Any updates?
I tried removing package-lock, and added the mentioned fix in babel.config.js. nothing works in iOS. Icons are visible on android.
upgrading from SDK 49 to 50, followed by expo install --fix

Unfortunately Expo 51 (current latest) requires moving away from React Navigation in favor of Expo Router in order to support web apps, which is quite a big architectural change. It would be ideal if this fix could work on Expo 50 as well, or if there could be a way to still use Expo 51 with React Navigation.

@JPStrydom it worked for me in SDK 50 not 51

from react-native-paper.

JPStrydom avatar JPStrydom commented on June 11, 2024

We build without cache in our pipelines and still had the same issues with icons on web. At least the babel plugin fix works for us as an interim solution:

module.exports = api => {
  api.cache(true);
  return {
    env: { production: { plugins: ['react-native-paper/babel'] } },
    plugins: [
      ['module:react-native-dotenv', { moduleName: '@env' }],
      [
        // TODO: [Expo 50] Once the web icon issue on RNP has been fixed, this alias override can be removed and babel-plugin-module-resolver can be uninstalled (https://github.com/callstack/react-native-paper/issues/4295)
        'babel-plugin-module-resolver',
        { alias: { 'react-native-vector-icons': '@expo/vector-icons' } }
      ]
    ],
    presets: ['babel-preset-expo']
  };
};

I understand that expo-router uses react-navigation under the hood, but, as far as I understand, one cannot build for web using the Metro bundler (as opposed to the old @expo/webpack-config bundler) without using Expo router.

Is this understanding correct, or can one build for web with Metro without migrating to expo-router?

from react-native-paper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.