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 type error when running a configuration similar to custom-server-typescript example

See original GitHub issue

Bug 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:closed
  • Created 3 years ago
  • Reactions:8
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
dakotaJangcommented, Aug 2, 2020

This problem still persists.

{
  "dependencies": {
    "next": "9.5.1",
    "typescript": "^3.9.7"
  }
}

@Timer, why is this issue closed? Is it being tracked on different issue?

5reactions
dandreicommented, May 21, 2020

I confirm that the problem is still present with TS 3.9.3 and Next.js 9.4.2. Latest working configuration still uses TS 3.8.3.

Read more comments on GitHub >

github_iconTop 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 >

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