Presence of local-cli __fixtures__ file breaks react-native-vector-icons
See original GitHub issueIs this a bug report?
yes
Have you read the Contributing Guidelines?
yes
Environment
Environment: OS: macOS Sierra 10.12.6 Node: 6.9.2 Yarn: Not Found npm: 5.6.0 Watchman: 4.7.0 Xcode: Xcode 9.2 Build version 9C40b Android Studio: 2.3 AI-162.4069837
Packages: (wanted => installed) react: 16.2.0 => 16.2.0 react-native: 0.52.0 => 0.52.0
Steps to Reproduce
- Install https://github.com/oblador/react-native-vector-icons
- Use in a component
- Start app
Expected Behavior
App starts successfully
Actual Behavior
Error is shown:
error: bundling failed: Error: While resolving module `react-native-vector-icons/MaterialIcons`, the Haste package `react-native-vector-icons` was found. However the module `MaterialIcons` could not be found within the package. Indeed, none of these files exist:
* `/Users/user/my-app/node_modules/react-native/local-cli/core/__fixtures__/files/MaterialIcons(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json)`
* `/Users/user/my-app/node_modules/react-native/local-cli/core/__fixtures__/files/MaterialIcons/index(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json)`
Steps to fix
As per https://github.com/oblador/react-native-vector-icons/issues/626
rm ./node_modules/react-native/local-cli/core/__fixtures__/files/package.json
It looks like this file is outdated for some time, I’m not sure if it needs to be there but it should either be updated or removed. For some reason it refers directly to the react-native-vector-icons project.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:62
- Comments:14 (7 by maintainers)
Top Results From Across the Web
React Native v0.54.0-rc.4 Release - GitClear
A framework for building native applications using React ... Presence of local-cli __fixtures__ file breaks react-native-vector-icons.
Read more >react native vector icons won't show in android device
Icon shows normal but what I want is integrating react native with my existing android app, not a totally RN app. use jsbundle...
Read more >Codebase Overview - React
This section will give you an overview of the React codebase organization, ... fixtures contains a few small React test applications for contributors....
Read more >Icons · React Native Paper - Open Source
Configuring icons. Many of the components require the react-native-vector-icons library to render correctly. If you're using Expo, you don't need to do ...
Read more >Add Notification Badges to Icons in React Native - PubNub
To style the UI, create a file in src/Styles called Styles.js, and add the following code. const AppStyles = { colors: { accentColor:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Workaround: addition of
rn-cli.config.js
(for RN 0.52 at least):It seems some blacklist items were lost in the process of moving from RN to metro 😕
@afilp
rn-cli.config.js
should be located in the root directory of the project. It is location where RN will find it automatically (https://github.com/facebook/react-native/issues/7271). Seems this info not documented.