Skip to content

Cannot read property 'measureLayoutRelativeToParent' of null #16

@wmcelderry

Description

@wmcelderry

Thanks for sharing your hard work, unfortunately it doesn't work for me, even with the simplest app as you provide in your example.

This component (Calculator) isn't working for me in expo 54.0.5.
I'm getting the message:

ERROR [TypeError: Cannot read property 'measureLayoutRelativeToParent' of null]

Code: index.tsx
   7 |     return (
   8 |       <View style={{ flex: 1 }}>
>  9 |         <Calculator style={{ flex: 1 }} />
     |         ^
  10 |       </View>
  11 |     )
  12 |   }

File: react-native-calculator/dist/Display.js , Line 40 is the culprit:

 40         react_native_1.NativeModules.UIManager.measureLayoutRelativeToParent(react_native_1.findNodeHandle(this._text), function () {
 41             throw new Error('error');
 42         }, function (_x, _y, w, h) {
 43             _this.isSizeOk(w, h);
 44         });

Perhaps linked to this deprecation issue?

My environment:

$ npx expo -v
54.0.5

I hope this bug report is useful to someone - if any more details are useful, please let me know and I'll provide them.

Thanks again!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions