Bolt's preview runs the dev server, which strips types without checking them. Netlify runs the build script, which starts with tsc -b and fails on any type error. So these errors were always there, you just never ran the build.
Order of work:
- Run
npm run buildlocally (or in Bolt's terminal) so you see the same list. TS6133(unused imports): harmless, delete the imports. Or set"noUnusedLocals": falseintsconfig.app.jsonif there are many.TS2345and friends: real bugs, fix them.api.ts:88passing a number where a string is expected will bite you at runtime.
Don't "fix" it by changing the build script to only vite build. It works, but you're shipping the bugs.
npm run buildpass when you run it in Bolt's terminal? rafa_dev · edited