Typescript type error when running a configuration similar to custom-server-typescript example
See original GitHub issueBug report
Describe the bug
After upgrading to Next 9.4, I was having an issue with what seems like Typescript reporting an error in my custom TS server project:
TypeError: Cannot read property 'kind' of undefined
The logging is a bit noisy, but compilation is successful.
To Reproduce
This issue could be reproduced by just running the official nextjs custom-server-typescript example here: https://github.com/zeit/next.js/tree/canary/examples/custom-server-typescript
essentially curl the example, cd into the directory, npm install && npm run dev, visit localhost:3000
Expected behavior
Should compile without any errors.
System information
- OS: macOS 10.15.4
- Version of Next.js: 9.4.0
- Version of Node.js: 10.16.3
Additional context
Add any other context about the problem here.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:8
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Improving TypeScript error handling with exhaustive type ...
Let's talk errors. To effectively discuss and evaluate the different error handling approaches in TypeScript, it's essential to first talk ...
Read more >Express and Typescript - Error.stack and Error.status ...
However, I'm getting the following error message: Property 'status' does not exist on type 'Error'. I get a similar message if I try...
Read more >Documentation - The Basics - TypeScript
Running that last sample with TypeScript will give us an error message before we run the code in the first place. Non-exception Failures....
Read more >15 Typescript Mistakes To Avoid - SoftwareMill Tech Blog
Using the Function type. It might be tempting, especially if we are working with code that deals with callbacks of various shapes, different...
Read more >Troubleshooting | ts-node - TypeStrong · GitHub
ts-node uses sensible default configurations to reduce boilerplate while still respecting ... Type errors from the compiler are thrown as a TSError ....
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
This problem still persists.
@Timer, why is this issue closed? Is it being tracked on different issue?
I confirm that the problem is still present with TS
3.9.3
and Next.js9.4.2
. Latest working configuration still uses TS3.8.3
.