After battling MongoDB error for 5 straight hours, turns out the fix was just slapping 'use server' at the top of the file. 

That's it.

That's literally it.

#coding #nextjs #errors
#coding #nextjs #errors