Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create react app doesn't compile on typescript error

I want typescript errors to appear as warnings, but not crash my dev server. I was able to do so for eslint with setting .env file with ESLINT_NO_DEV_ERRORS=true.

Is there a typescript equivalent?

It's really counter-productive for the prototyping phase.

This SO answer suggests:

{
  "compilerOptions": {
    ...
    strict: false
  }
)

But this also configures many other things (i.e. no no implicit any)

Thanks!

like image 868
goldylucks Avatar asked Jun 25 '26 04:06

goldylucks


1 Answers

Set the enviroment variable TSC_COMPILE_ON_ERROR=true.

More

You can find this and other options here : https://create-react-app.dev/docs/advanced-configuration/

Note: As of 2022-02-20 this is not only for development, but also for production.

like image 189
basarat Avatar answered Jun 27 '26 00:06

basarat