Render Error Reporting
See original GitHub issueFirst, can I say thanks for this package, it’s way better than any pdf generator I’ve used before.
I’ve come up against a problem and I was hoping for some pointers.
I’m using version 2.0.0-beta.5, which has proved to be very helpful with the new features, especially minPresenceAhead
.
I’ve just come up against this message at the render stage:
TypeError: Cannot read property ‘height’ of undefined at setNodeHeight (resolveDimensions.js:72) at resolveDimensions.js:85 at tap (tap.js:26) at _dispatchable.js:38 at _curry2.js:19 at f1 (_curry1.js:16) at _pipe.js:3 at _pipe.js:3 at _pipe.js:3 at _arity.js:10 at resolveDimensions.js:176
What I would really like here is a bit more information in the error, for example some info about which node is causing a problem.
In the meantime, could you give me any pointers about what kind of mistake on my part could have caused this? I’ve been using the package constantly for the last 3 weeks and this is the first time I’ve encountered this message.
I’m going to try to find the error but it’s a massive document and a long job to wade through it.
Thanks!
Tom
Issue Analytics
- State:
- Created 3 years ago
- Comments:9
Top GitHub Comments
Thank you for your reply, and apologies for the late response—I’m still working through this and haven’t figured out a solution. As it turns out, image rendering wasn’t the source of the issue. This is the error I’m seeing at render time (similar to you):
I understand that this issue is to ask for more descriptive error messages, but what I’m asking you is what exactly was the issue in your code that caused this error in the first place?
Edit: I actually just figured it out about 5 minutes after I posted this. I was conditionally rendering components using a double ampersand (
&&
), which breaks something in the Yoga renderer.In case anyone else runs into this issue, here’s what worked for me when rendering components:
I can confirm that the above suggestion to use a ternary operation to
null
instead of&&
solved my issue withTypeError: Cannot read property 'height' of undefined
as well.