When building/deploying via Netlify, typescript compilation produces more errors than I see locally. They’re legitimate ts errors, but tsc succeeds locally and my dev server (reactjs) runs.
I’ve added some debugging lines, such as: show the typescript version, verify working directory, cat tsconfig file contents
I run the exact same yarn script locally.
I tried switching NODE_ENV back and forth between"production" and “development”.
I tried the “netlify dev” local pipeline.
The true Netlify build pipeline produces more errors
We do use lerna, and build multiple packages, so it’s not a simple situation to reproduce.
Hi, have you verified that you’re using the same version of typescript locally as you are in our build environment? We don’t have Typescript in our build environment by default so it’s installed along with the rest of your dependencies using the versions in your package.json. It also will just use your tsconfig file so there isn’t anything we do specially that would make it more “strict”.
yes, all exactly the same. I was hoping you could shed some light on any environment details. Any chance you could share your setup scripts? maybe a docker file if you use that?
I’m also experiencing a similar issue. I recently updated typescript to 3.7.2 and running yarn build locally is working, but I’m getting Typescript error when trying to deploy