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.

Error while updating property 'fontSize' in shadow node of type: RCTText

See original GitHub issue

Environment

OS: Android 6.0.1 (real device, not emulator) react-native-vector-icons: ^7.0.0 react: 16.11.0, react-native: 0.62.2,

Description

The issue is rather simple. Whenever I use react-native-vector-icons, get the error, Error while updating property 'fontSize' in shadow node of type: RCTText Screenshot_20200709-153842

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

import React from 'react';
import {View, TouchableOpacity, Text, StyleSheet} from 'react-native';
import Ionicons from 'react-native-vector-icons/Ionicons';

const Header = () => {
  return (
    <View style={styles.viewStyle}>
      <TouchableOpacity onPress={() => alert('Menu')}>
        <Ionicons name="md-apps" size={20} />
      </TouchableOpacity>
      <Text style={styles.textStyle}>ALL PRODUCTS</Text>
      <TouchableOpacity onPress={() => alert('Shopping Cart')}>
        <Text>C</Text>
      </TouchableOpacity>
    </View>
  );
};

const styles = StyleSheet.create({
  viewStyle: {
    flexDirection: 'row',
    backgroundColor: '#f8f8f8',
    justifyContent: 'space-between',
    alignItems: 'center',
    height: 60,
  },
  textStyle: {
    fontSize: 12,
    fontWeight: 'bold',
  },
  cartStyle: {
    marginHorizontal: 15,
  },
});

export default Header;

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

3reactions
octoro-softwarecommented, Feb 19, 2022

@haloriyan @aqeebimtiaz passing style={{fontSize: 30}} will bypass this error

0reactions
EinsteinNjorogecommented, Oct 28, 2022

Expanding on @octoro-software’s suggestion, I solved this by checking for instances where fontSize was defined as a string and changed that to an integer. style={{ fontSize: '13' }} => style={{ fontSize: 13 }}

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error while updating property 'fontSize' in shadow node of type
I have deleted node_modules and rerun npm install. After that i got this error: Error while updating property ...
Read more >
Critical error while updating property 'fontSize' in shadow ...
Hello, I encountered this error Only on Android.on iOs all works perfectly the same for the web view. To reproduce the bug, create...
Read more >
Error while updating property 'width' in shadow node of type
Coding example for the question Error while updating property 'width' in shadow node of type: RNSVGsvgView-React Native.
Read more >
Error On An Android Studio Project While Updating Property:
. the emulatorGenymotioin but when I run it on real device it shows me an error. Error while updating property 'height' in shadow...
Read more >
Android app crashing when opening - Get Help - Adalo - Forum
JSApplicationIllegalArgumentException : Error while updating property 'fontSize' in shadow node of type: RCTVirtualText
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