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.

Typescript error Property 'message' does not exist on type when using`errors.myField.message` after upgrading to 7.7.1

See original GitHub issue

Describe the bug After upgrading from 7.7.0 to 7.7.1 I am getting a typescript error Property 'message' does not exist on type when trying to display the error message of a nested object. This did not give an error in 7.7.0.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/s/jolly-bell-szqwf?file=/src/App.tsx
  2. Notice the typescript error message at line 30 property message does not exist

Codesandbox link (Required) https://codesandbox.io/s/jolly-bell-szqwf?file=/src/App.tsx

Expected behavior There is no typescript error. The error message seems to properly display so I would expect that that the types would reflect that the message property exists.

Desktop (please complete the following information):

  • OS: Mac
  • Browser Chrome
  • Version Version 90.0.4430.212 (Official Build) (x86_64)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
anarkcommented, May 31, 2021

Thanks @bluebill1049, strange that the error didn’t show up in 7.7.0.

Thank you so much for the quick response, that looks like it works.

0reactions
JoshuaCS94commented, Oct 29, 2021

Any update regarding this? NestesValue doesn’t even accept native File… 😄 I’m stuck at trying to upload a logo file in TS but I can’t figure out how to properly declare the type of such field

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why Typescript throw error message: Property does not exist ...
Basically, Typescript doesn't keep track of a relationship between the types of the variables action and type ; when type 's type is...
Read more >
Deciphering TypeScript's React errors | by Fiona Hopkins |
When TypeScript complains, its error messages are verbose, ... The fix: When you see “ Property XXX does not exist on type ,”...
Read more >
How to fix 'Property does not exist on type Window in ...
The code worked fine, but the classic 'Property does not exist on type Window in TypeScript' error flagged up on the build command...
Read more >
Typescript Type System: How Does it Really Work? Type ...
Let's have a look at the error message we get: Error:(54, 6) TS2339:Property 'name' does not exist on type '{}'. So what is ......
Read more >
Typescript Errors How do I ignore the error property does not ...
I get many `The property 'x' does not exist on value of type 'y'` errors, which I want to ignore when using JS...
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