React-native-vector-icons: /lrn/node_modules/react-native-vector-icons/MaterialIcons.js: Couldn't find preset "module:metro-react-native-babel-preset" relative to directory "lrn/node_modules/react-native-vector-icons"

Created on 5 Oct 2018  路  6Comments  路  Source: oblador/react-native-vector-icons

Environment

MacOS,

Description

Describe your issue in detail. Include screenshots if needed.

Reproducible Demo

Let us know how to reproduce the issue. Include a code sample, share a project, or share an app that reproduces the issue using https://snack.expo.io/. Please follow the guidelines for providing a MCVE: https://stackoverflow.com/help/mcve

Most helpful comment

Downgrading to 5.0.0 works...

All 6 comments

Same issue here!

ENV:
"react-native": "0.55.3",
"react-native-vector-icons": "6.0.1",

Downgrading to 5.0.0 works...

Same error here and I had to downgrade to v5.
Any actual solution? or reason why it is happening?

I found the solution here, not sure what the exact issue is though

Hi, this was caused by React Native changing the name of their babel config and that our .babelrc was in the npm bundle. Metro then wanted to transform the code with my newer preset (although it already is transformed). Version 6.0.2 should fix this issue. Sorry for the inconvenience.

Thanks for the explanation @oblador !
I'll try 6.0.2 as soon as I can.

Was this page helpful?
0 / 5 - 0 ratings