Cannot find module '@saas-ui/forms/zod' or its corresponding type declarations
See original GitHub issueAfter upgrading to version 1.0.1
from 1.0.0-rc.15
, I’m no longer able to import zodFieldResolver, zodResolver
from @saas-ui/forms/zod
.
This is how i was using it
// BaseForm.tsx
import { zodFieldResolver, zodResolver } from "@saas-ui/forms/zod";
import { Form as BaseForm } from "@saas-ui/react";
import { ZodTypeAny } from "zod";
BaseForm.getResolver = (schema: ZodTypeAny) => zodResolver(schema); // @hookform/resolvers
BaseForm.getFieldResolver = (schema: ZodTypeAny) => zodFieldResolver(schema); // AutoForm field resolver
export default BaseForm;
UPDATE: this issue always happens when I upgrade @saas-ui/react
to the latest released version. Even if I revert back to the previous version after that, the problem still persists. So I delete node_modules
and yarn.lock
then I do a fresh installation of packages inside package.json
Issue Analytics
- State:
- Created a year ago
- Comments:17 (17 by maintainers)
Top Results From Across the Web
Cannot find module 'react' or its corresponding type ...
The editor throws errors while importing every installed library like this: Cannot find module 'react' or its corresponding type declarations. The project ...
Read more >Cannot find module '...' or its corresponding type declarations.
In v 3.x that your package json refers to there's no "root" jose export. And there's no exported member "JWK". Read the individual...
Read more >Cannot find module 'X' Error in TypeScript | bobbyhadz
The "Cannot find module or its corresponding type declarations" error occurs when TypeScript cannot locate a third-party or local module in our project....
Read more >cannot find module or its corresponding type declarations
The "Cannot find module or its corresponding type declarations" error occurs when TypeScript cannot locate a third-party or local module in our project....
Read more >cannot find module '...' or its corresponding type declarations
I've been trying to deploy my nextjs app on Vercel, but got "Type error: cannot find module '...' or its corresponding type declarations" ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Fixed in 1.0.2
Thanks again!
I see, I thought it did. It’s a good thing that the majority of components can be directly accessed through
@saas-ui/react
I think it’d be great to put a notice somewhere in the docs about this issue(installing in monorepo vs non-monorepo) so that you don’t get other users asking the same question over again.
Yeah you’re right. It was a pain with another issue and fortunately, I managed to fix it.
Thanks for everything.