Can not build project with V2 Typing. Next js build shows "Parsing error: Invalid character" with database.types.ts file.
See original GitHub issueWas experimenting old project with Supabase-V2 Typing. Unfortunately stuck with Error in database.ts file which is database types generated by CLI tool.
Here is the error produced
./lib/database.ts
Error: Parsing error: Invalid character.
info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
Issue Analytics
- State:
- Created a year ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Ignoring TypeScript Errors - next.config.js
js fails your production build ( next build ) when TypeScript errors are present in your project. If you'd like Next.js to dangerously...
Read more >Error: TSError: Unable to compile TypeScript - Stack Overflow
My Project is built on Angular4 with typescript, e2e testing with protractor & karma. Travis-ci has this error: [03:34:54] E/launcher - Error: ...
Read more >Changelog - Cypress Documentation
Fixed an issue with Angular Component Testing where urls within SASS/SCSS files were not being correctly resolved which could result in incomplete styling....
Read more >Invalid template errors - Azure Resource Manager
Describes how to resolve invalid template errors when deploying Bicep files or Azure Resource Manager templates (ARM templates).
Read more >Errors – Vercel Docs
Definition: The requested Serverless Function from the application did not return a string as the body. Occurrence: This could happen if the Serverless...
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 Free
Top 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

Btw this is my templorary fix (for anyone experiencing the same issue): Rather than deleting the whole eslint configuration file, I just added a
.eslintignorefile in my project and entereddatabase.types.tsin it. Better than no configuration I guess 😄Sadly TS playground didn’t complain.
Tried to alter my eslint config in different ways, but even the base config that Next.js generates causes this error.
However, if I delete the eslint configuration file completely, the project builds without this error.
For reference, this is my current eslint config (which causes the build to fail):
And below are the variations of config options I tried (all failed with the same error):
Variation 1:
Variation 2:
Variation 3:
At this point this seems like an issue with eslint rather than the
database.types.tsfile that Supabase generates. Will post an update if I find out the reason for this error.Thanks a lot for your help @soedirgo 🙏