Skip to content
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

FileList Reference Error with remix-hook-form #121

Open
sid10297 opened this issue Nov 7, 2024 · 0 comments
Open

FileList Reference Error with remix-hook-form #121

sid10297 opened this issue Nov 7, 2024 · 0 comments

Comments

@sid10297
Copy link

sid10297 commented Nov 7, 2024

Issue: When using remix-hook-form in a server-rendered environment (e.g., with Remix on Node.js), a ReferenceError occurs due to an undefined FileList. Since FileList is specific to the browser, referencing it directly in non-browser environments results in the following error:

    if (value instanceof FileList) {
                         ^

ReferenceError: FileList is not defined
    at createFormData

This issue prevents remix-hook-form from being used in server-side contexts, limiting its compatibility in Remix applications.

Environment:

@remix-run/react: 2.7.1
remix-hook-form: 5.1.1
react-hook-form: 7.53.1

@sid10297 sid10297 changed the title FileList Reference Error in Non-Browser Environments with remix-hook-form FileList Reference Error with remix-hook-form Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant