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

Error: Unexpected import statement in CJS module. using @hookform/resolvers 2.8.4, react-hook-form 7.21.2, and Next.js 12.0.7 #301

Closed
trevorpfiz opened this issue Dec 10, 2021 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@trevorpfiz
Copy link

trevorpfiz commented Dec 10, 2021

Describe the bug
Error: Unexpected import statement in CJS module.

To Reproduce
Steps to reproduce the behavior:

  1. Next.js (tested 12.0.4 and 12.0.7)
  2. npm install "@hookform/resolvers": "^2.8.4" and "react-hook-form": "^7.21.2"
  3. import { yupResolver } from "@hookform/resolvers/yup"
  4. See error

Expected behavior
No error with import

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Chrome
@trevorpfiz
Copy link
Author

trevorpfiz commented Dec 10, 2021

I tested v1.3.0 because of this thread https://github.com/react-hook-form/resolvers/issues/105 and it worked.

@bluebill1049 bluebill1049 added the duplicate This issue or pull request already exists label Dec 10, 2021
@bluebill1049
Copy link
Member

#271

@trevorpfiz trevorpfiz changed the title Error: Unexpected import statement in CJS module. using @hookform/resolvers 2.8.4 and Next.js 12.0.7 Error: Unexpected import statement in CJS module. using @hookform/resolvers 2.8.4, react-hook-form 7.21.2, and Next.js 12.0.7 Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants