convex-helpers preventing my turbo build from running?
I have no clue what is the reason behind this, ive tried multiple approaches to finding out the reason why this error is happening, but wihtout luck?
Can anyone guide me in the right direction here?
10 Replies
Sounds a bit like https://discord.com/channels/1019350475847499849/1216803200150012132/1216803200150012132
It looks like the way that convex-helpers are compiled, in particular https://www.unpkg.com/browse/convex-helpers@0.1.25/dist/index.js, uses fancier syntax than TypeScript as configured in this project is happy with.
There could be a library change here where it's compiled to lower-level syntax, or you could change your tsconfig.json to allow this.
@oscklm What's your tsconfig.json look like? Not the one in the convex directory, the one in the project root.
Ahh okay!
Thanks for the quick response, tryna get the project pushed up on vercel right now for my colleague to use haha, so it's appriciated
the error says
with a '--target' of 'es2015' or higher.and your target is "ES2015", so it seems like there's typechecking going on that doesn't use this tsconfig.json. also you've got
"downlevelIteration": true,
right there@oscklm to quickly unblock you could make TYpeScript errors not block the build https://nextjs.org/docs/pages/api-reference/next-config-js/typescript
next.config.js Options: typescript | Next.js
Next.js reports TypeScript errors by default. Learn to opt-out of this behavior here.
I have individual tsconfigs in each app:
We're doing a pass on convex-helpers patterns soon, so the convex-helpers side of this may be resolved soon — but there's something interesting about Next here where it typechecks using a different config than the one provided
Maybe that's the issue. But i'll try the quick unblock fix for now
I'd love to understand what tsconfig.json settings are being used for this typecheck that's blocking your build
since that error message doesn't make sense given the settings of either of the tsconfig.json files you've shown
I'm glad i'm not the only one thinking it doesn't make sense.
Yeah right. To be fair i'm not even using next in my personal projects anymore. Just vite, react and tanstack router. Next is really being a pain in the butt as of late i would say. Unfortunately no way around next for this project for the time being.
I wouldn't mind adding you to the full repo, in case you wanna take a look. but at the same time def, don't wanna steal your time. I'm assuming this aint really that convex related anyways. But give me a shout and i will.
Alright, seem's to have been the moduleResolution, was set to node. Changed it to bundler, and now it works. I might have actullay changed that to node at one point, since it solves some issues i was having with intellisense, but seems those are gone too even changing it back to bundler.
Was offline for a bit or would have responded, that's great to hear — thanks for tracking this down.