Next.js Discord

Discord Forum

Object.groupBy on Vercel

Answered
Peterbald posted this in #help-forum
Open in Discord
PeterbaldOP
Hello! I've been using Object.groupBy() in my Next.js project successfully. I'm using the latest TypeScript and have added a d.ts file to support it, but I get the following in my stacktrace when I push it up to Vercel:

TypeError: Object.groupBy is not a function

What do I need to upgrade to support this? I used create-next-app to make this project.

Thanks!
Answered by Ray
Object.groupBy require node version >= 21.0.0
View full answer

6 Replies

Answer
which is not available on vercel yet
PeterbaldOP
@Ray thanks for replying!

How do we know when it is updated? Thanks.
When Vercel adds support for Node versions, they will announce it
But generally Vercel doesn’t support odd number versions, so you’ll need to wait until Node 22 LTS is available