question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is it possible to not add React Native Vector Icon to this package?

See original GitHub issue

I just removed React Native Vector Icons because I don’t want to use it. It causes me some bug on react-native link... So I unlink it and remove it from my project.

But now after 2 hours I found why my projects fails with this error : https://github.com/facebook/react-native/issues/24094

It seems your package use React Native Vector Icons but when I delete it, so it causes bug on your package :

error: bundling failed: Error: Unable to resolve module react-native-vector-icons/MaterialIcons from /front/node_modules/react-native-paper/src/components/Icon.js: Module react-native-vector-icons/MaterialIcons does not exist in the Haste module map

Now I’m stuck, what can I do?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
MakhouTcommented, Aug 21, 2019

@satya164 Add the plugin as in install it or add it to babelConfig.js? I’m also having issues opting out of this…

EDIT: Never mind got it working!

For the people interested:

babel.config.js needs to look like this:

module.exports = {
  presets: ['module:metro-react-native-babel-preset'],
  env: {
    production: {
      plugins: ['react-native-paper/babel'],
    },
  },
  plugins: ['optional-require'],
};

3reactions
satya164commented, Mar 22, 2019

@Steffi3rd you just need to add the plugin and run react-native start --reset-cache to start the packager. No additional config is needed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error in installing react-native-vector-icon
1 Answer 1 · react-native link react-native-vector-icons · react-native start · react-native run-android.
Read more >
react-native-vector-icons
Customizable Icons for React Native with support for NavBar/TabBar, image source and full styling.. Latest version: 9.2.0, last published: 6 ...
Read more >
Importing and using react-native-vector-icons the right way in ...
If you want to properly install react-native-vector-icons on an android platform, follow the steps below: Open and Edit build.gradle file: android/app/build.
Read more >
Example to Use React Native Vector Icons
Example contains how to integrate and use Vector Icons in React Native application. Vector Icons are very useful in React Native development.
Read more >
Creating custom icon set
if the react native vector icons are installed by native base you do not need to reinstall or relink it. You could simply...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found