Skip to content

NextJS not showing TypeScript errors on Runtime #13617

Answered by rafaelalmeidatk
vacom asked this question in Help
Discussion options

You must be logged in to vote

I am not sure if there is a way to enable runtime type errors, but in my experience it is better if your environment doesn't crash with type errors. Sometimes you want to test something and don't care for the types, but if you app keeps giving an error you have to waste a lot of time fixing the types for something you won't even use anyway.

In my TS projects, I create a npm script called type-check that I can run whenever I change something and want to make sure all the codebase is still correct:

"type-check": "tsc --noEmit",

If you want to make sure you aren't merging code with type errors, you can include this command in your CI tasks too, before the build.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@vacom
Comment options

@rafaelalmeidatk
Comment options

@vacom
Comment options

Answer selected by vacom
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants