-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Named export 'useDropzone' not found
#42
Comments
Named export 'useDropzone' not found.
Named export 'useDropzone' not found
Have you tried deleting your node_modules directory & lock-file and re-running |
@caketime Thanks for the suggestion (especially since I'm junior at front-end), but after deleting |
@KastanDay Sorry to hear that it didn't help. React / Nextjs is also very new for me. There's lot's to learn 😄 So according to the bug report you shared, this issue comes up when react-dropzone get's into the server-side rendering part of the react app. Maybe check if you have added uploadthing into something like a "getStaticProps" function. That was explained by theo in his web dev tutorial last month. I've also seen things being marked for server side rendering with the "use server" flag (although I don't fully understand that flag yet). Hopefully you can find the cause 🙏🏼 |
I finally solved this issue by editing - import { useDropzone } from "react-dropzone";
+ import pkg from 'react-dropzone';
+ const { useDropzone } = pkg; This was suggested by the error message, and appears to work. Although it feels very wrong. Better solutions welcomed! |
Turns out I missed the giant warning in the docs: https://docs.uploadthing.com/nextjs/pagedir
|
Experiencing this error after following documentation.
Might be related to this: react-dropzone/react-dropzone#1259
Apologies, I'm new to react and couldn't determine the proper fix from this thread.
The text was updated successfully, but these errors were encountered: