We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
yingyangcode
2 years agoNew member | Level 2
Javascript SDK on Next JS Server Components / Routes
Hi, I am trying to use the dropbox sdk in a next js 14 application. I want to download files on the server and pass them to the client.
const dbx = new Dropbox({ accessToken });
const ...
Greg-DB
Dropbox Community Moderator
2 years agoThe Dropbox JavaScript SDK isn't built to specifically support Next.JS, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.
That said, based on the error you shared it looks like the issue is that the fetch function is not available in your environment. The Dropbox SDK does need the fetch function to make network requests though, so if you do have access to the fetch function, you can pass it in to the Dropbox constructor. There's some more information here.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!