-
-
Notifications
You must be signed in to change notification settings - Fork 59
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 when Using Arktype Resolver #1022
Comments
As of now we only support ESM in 2.0. I'm surprised to see you're getting this error though and not something complaining about an import. I will try to take a deeper look at this in the next few days so we can at least get the bottom of how you're getting that error as I want to make sure we're not somehow getting two versions of the package e.g. from the peer dep in |
I did take a quick look at "./arktype": {
"types": "./arktype/dist/index.d.ts",
"umd": "./arktype/dist/arktype.umd.js",
"import": "./arktype/dist/arktype.mjs",
"require": "./arktype/dist/arktype.js"
}, Given ArkType 2.0 doesn't currently support CJS, I wonder if this could cause problems or if there's at least a better way to avoid a confusing error like this. ArkType currently publishes the following in its package.json: "type": "module",
"main": "./out/index.js",
"types": "./out/index.d.ts",
"exports": {
".": "./out/index.js",
"./config": "./out/config.js",
"./internal/*": "./out/*"
},
Would it be perhaps better if I specified CC @Andarist since I helplessly defer to him whenever I have questions about this sort of thing 😆 |
Hi, I have a reproduction of the same error https://github.com/kevinwcyu/arktype-nextjs-registry-error. I created an app with You can reproduce it by
Note: This doesn't happen if you run I'm using the following: |
As mentioned in DMs, I don't think this would change a thing here. If Arktype doesn't offer CJS then |
Apparently addressed in react-hook-form/resolvers#693 (comment) Let me know if the issue still persists for anyone. |
Report a bug
This is a duplicate of issue #693 in the
@hookform/resolvers
repository. Basically, I tried using thearktypeResolver
in the context of a Next.js and Vite/React app, both times with the same result:🔎 Search Terms
resolvers
hook form
🧩 Context
2.0.0-dev.24
5.2.2
@hookform/[email protected]
and[email protected]
🧑💻 Repro
I created a (almost) minimal reproduction here.
The text was updated successfully, but these errors were encountered: