Skip to content

Error when Trying to Use Arktype Resolver #693

Closed
@lucaschultz

Description

@lucaschultz

Describe the bug
When trying to use the arktypeResolver the following error happens:

Error: Tried to initialize an $ark registry but one already existed.
This probably means you are either depending on multiple versions of an arktype package,
or importing the same package from both ESM and CJS.
Review package.json versions across your repo to ensure consistency.

To Reproduce
Steps to reproduce the behavior:

  1. Call the useForm hook with the arktypeResolver as resolver.

Codesandbox link (Required)
No Codesandbox link, but I created a minimal reproduction using Next.js here, but the error happened in a Vite/React app I'm working on. @ssalbdivad you might wanna have a look 😊

Expected behavior
Being able to use the provider, regardless if the project is ESM or not.

Screenshots

Bildschirmfoto 2024-06-18 um 12 28 05

Desktop (please complete the following information):

  • OS: macOS
  • Browser: Chrome
  • Version: 125.0.6422.114

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions