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

TSC: Cannot find module '@hapi/joi' #78

Closed
kingarawana opened this issue Nov 16, 2020 · 4 comments
Closed

TSC: Cannot find module '@hapi/joi' #78

kingarawana opened this issue Nov 16, 2020 · 4 comments

Comments

@kingarawana
Copy link

kingarawana commented Nov 16, 2020

There's an issue where the joi resolver is importing from @hapi/joi but @hapi/joi is a devDependency.

I'm thinking @hapi/joi needs to be moved to dependencies?

../../node_modules/@hookform/resolvers/dist/joi.d.ts:2:17 - error TS2307: Cannot find module '@hapi/joi' or its corresponding type declarations.

@bluebill1049
Copy link
Member

can you share a CSB?

@kingarawana
Copy link
Author

What's a CSB?

I basically get this error when I compile w/ typescript. If I set skipLibCheck = true, it passes.

node version: v12.18.3
tsc: 4.0.5

Here's the TS options:

{
"compilerOptions": {
"allowJs": true,
"esModuleInterop": true,
"moduleResolution": "node",
"target": "es2018",
"module": "CommonJs",
"lib": ["es2018"],
"jsx": "preserve",
"outDir": "./dist",
"strict": false,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"baseUrl": "./src/",
"allowSyntheticDefaultImports": true,
"isolatedModules": false,
"noErrorTruncation": true,
"sourceMap": true,
}

@bluebill1049
Copy link
Member

codesandbox?

@bluebill1049
Copy link
Member

looks like it's been deprecated: #79 will release a new version soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants