Error: Attempted to call g() from the server but g is on the client

I'm encountering an error when trying to upload files using the @uploadthing/react package in my Next.js project. The error message indicates that a client-side function g() is being called from the server, which is not allowed. Error Message:
Error: Attempted to call g() from the server but g 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.
at <unknown> (file://C%3A/Users/Rahul/Desktop/jobfynder/node_modules/.pnpm/%40uploadthing%2Breact%407.1.2_next%4015.0.3_react-dom%4019.0.0-rc-66855b96-20241106_react%4019.0.0-rc-66_7ieb7immhhmk3vcbvr5vvoo4ai/node_modules/%40uploadthing/react/dist/button-client-DpQoAqtf.js/proxy.js:28:23)
Error: Attempted to call g() from the server but g 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.
at <unknown> (file://C%3A/Users/Rahul/Desktop/jobfynder/node_modules/.pnpm/%40uploadthing%2Breact%407.1.2_next%4015.0.3_react-dom%4019.0.0-rc-66855b96-20241106_react%4019.0.0-rc-66_7ieb7immhhmk3vcbvr5vvoo4ai/node_modules/%40uploadthing/react/dist/button-client-DpQoAqtf.js/proxy.js:28:23)
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server