79146219

Date: 2024-10-31 20:17:40
Score: 1
Natty:
Report link

If you are using Next.js 14 and under you will get:

"WEBPACK_IMPORTED_MODULE_3_.functionName) is not a function".

On Next.js 15, it says

"[ Server ] Error: Attempted to call functionName() from the server but functionName is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."

In conclusion, you need to create a client component and call the function there, then return the client component.

Sorry if this seems out of place or poorly worded. I am very frustrated it took this long for me to fix and needed to get this out.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Pill