Hi @rishabh-singh-codes! I don’t get that error with a fresh create-next-app project, but I believe your project has some additional customization added. If you can make the repo public or share a minimal reproducible example, then we can work together from the same code to debug this.
You should be able to get this working with a polyfill. I built a minimal test app based on the repo you shared. That let me see the same error on both the deployed version and my local version (both using Node v20).
Here’s what I did to get it working:
Run npm install core-js
Add import "core-js/proposals/array-grouping-v2" to the files where Object.groupBy() is used
Success!
In case you’re curious about why this is needed or how it works, I’m including some links to additional resources below. Please let me know if you continue to have trouble with it.