Don't crash build on TSC errors
See original GitHub issue- I’d be willing to implement this feature (contributing guide)
Description
Usually I load these env variables to NOT crash the dev server on linting/tsc errors:
ESLINT_NO_DEV_ERRORS=true
TSC_COMPILE_ON_ERROR=true
But because these aren’t prefixed with NX_
, they are ignored in nx, thus making the server crash on every little temporary error.
Motivation
Cut down dev time and frustration
Suggested Implementation
- introduce an easy way to override this crashing behavior, and have it be the default
- support non
NX_
prefixed env variables - Make this configuration available cross projects, i.e. I could globally set these env variables on all projects instead of manually setting them up for each new one.
Alternate Implementations
🤷♀️
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:5
Top Results From Across the Web
crash the build process on error · Issue #295 · ivogabe/gulp ...
When a typescript error is detected, gulp shouldn't exit with code 0, an error should be reported instead. Actual behavior: errors are displayed ......
Read more >Create react app doesn't compile on typescript error
Save this question. Show activity on this post. I want typescript errors to appear as warnings, but not crash my dev server. I...
Read more >Documentation - The Basics - TypeScript
An editor that supports TypeScript can deliver “quick fixes” to automatically fix errors, refactorings to easily re-organize code, and useful navigation ...
Read more >Workarounds for Out of Memory Crashes | manual
The first workaround you should try is "noStrictGenericChecks": true . Does compilation now succeed? This disables additional checking that was added in ...
Read more >Improving TypeScript error handling with exhaustive type ...
Discover an improved method for handling errors in TypeScript that solves problems that arise from returning null and throwing try...catch.
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
I think that dev server does not crash but there is an overlay from webpack with error messages being displayed in the browser. I was able to disable the overlay by creating a custom webpack config according to this tutorial.
In my
project.json
I updated thetargets.build.options.webpackConfig
key to point to the created webpack config:My webpack config looks as follows:
If I try to build the project via
npx nx run client:build
I still get typescript compilation errors so this change seems to affect only the development workflow.Guys any progress here?
@Ofadiman any ideas?