javascriptreactjstypescriptzod

Could not find a declaration file for module '@hookform/resolvers/zod'


Im trying to use zod with react-hook-form but the import hook form resolver gives the error below

Could not find a declaration file for module '@hookform/resolvers/zod'. '/pradeep/projects/react/safe-zone/node_modules/@hookform/resolvers/zod/dist/zod.mjs' implicitly has an 'any' type.

enter image description here


Solution

  • I got this resolved by running the below cmd

    npm i -save-dev @hookform/resolvers