react-native-paper icon indicating copy to clipboard operation
react-native-paper copied to clipboard

Errors after switching to @react-native-vector-icons/material-design-icons

Open atheck opened this issue 7 months ago • 9 comments

Current behaviour

After switching from "react-native-vector-icons" to "@react-native-vector-icons/material-design-icons" and updating react-native-paper to v5.14.1, I get the following errors when starting the Android App:

Image

Image

I followed the steps for migrating to @react-native-vector icons v12.

Expected behaviour

The App should run.

How to reproduce?

Preview

What have you tried so far?

With react-native-paper 5.13.5 and react-native-vector-icons using MaterialCommunityIcons everything worked fine.

Your Environment

software version
ios -
android 14
react-native 0.77.2
react-native-paper 5.14.1
node 22.14.0
npm 10.9.2
expo sdk -

atheck avatar May 09 '25 12:05 atheck

@atheck could you please attach the repro?

lukewalczak avatar May 09 '25 12:05 lukewalczak

Hey! Thanks for opening the issue. Can you provide a minimal repro which demonstrates the issue? Posting a snippet of your code in the issue is useful, but it's not usually straightforward to run. A repro will help us debug the issue faster. Please try to keep the repro as small as possible. The easiest way to provide a repro is on snack.expo.dev. If it's not possible to repro it on snack.expo.dev, then you can also provide the repro in a GitHub repository.

github-actions[bot] avatar May 09 '25 12:05 github-actions[bot]

I have a similar problem in a react-native-web + RNP project. The latest RNP version throws this runtime error: "Failed to resolve import "@react-native-vector-icons/material-design-icons" from "node_modules/.vite/deps/react-native-paper.js?v=0e6453b5". Does the file exist?" I downgraded back to RNP 5.13.1 and everything works fine.

alariej avatar May 12 '25 08:05 alariej

Hey @alariej, please try to reproduce on the simple setup and attach the repo.

lukewalczak avatar May 12 '25 08:05 lukewalczak

I'm encountering the same issue in react-native-paper version 5.6.0. Is there any known workaround or recommended fix for this?

mrunal15995 avatar May 14 '25 02:05 mrunal15995

I created a new react-native app using react-native 0.77.2, react-native-paper 5.14.3 and @react-native-vector-icons/material-design-icons 12.0.0. It is working.

I'll try to find the problem in my other app and leave a comment here how I solved it.

atheck avatar May 14 '25 11:05 atheck

I have been working on a project with nativewind. Upgrading from 5.13.1 to 5.14.3 caused this error to popup

For me, it was due to the nativewind plugin which was causing this error. Removing it fixed it but I am not pretty sure how to solve it with nativewind in place.

Downgrading it to 5.13.1 puts everything back to normal

Just throwing this comment out here if it is of any help to anyone who is able to solve it. Maybe it is due the metro or babel config files!

Thanks

prasadfutballer avatar May 15 '25 10:05 prasadfutballer

Hello 👋, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix it.

github-actions[bot] avatar Jun 15 '25 02:06 github-actions[bot]

I still have this issue and will try to figure out why when I have some time.

atheck avatar Jun 15 '25 08:06 atheck

The same thing happened to me

I downgraded to version 5.13.1 and it works.

EduardoMateos avatar Jun 25 '25 19:06 EduardoMateos

I solved it by removing the inlineRequires property in the metro config:

From:

const config = {
  transformer: {
    getTransformOptions: async () => ({
      transform: {
        experimentalImportSupport: false,
        inlineRequires: true,
      },
    }),
  },
};

To:

const config = {
  transformer: {
    getTransformOptions: async () => ({
      transform: {
        experimentalImportSupport: false,
      },
    }),
  },
};

atheck avatar Jul 04 '25 11:07 atheck

downgrading works!

KaushithGowda avatar Jul 08 '25 10:07 KaushithGowda

Hello 👋, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix it.

github-actions[bot] avatar Aug 08 '25 02:08 github-actions[bot]