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

joi should be declared as a dependency? #4536

Closed
dominykas opened this issue Dec 11, 2024 · 2 comments
Closed

joi should be declared as a dependency? #4536

dominykas opened this issue Dec 11, 2024 · 2 comments
Labels
bug Bug or defect

Comments

@dominykas
Copy link
Contributor

Runtime

node.js

Runtime version

v22

Module version

latest (23.x)

Last module version without issue

No response

Used with

No response

Any other relevant information

No response

What are you trying to achieve or the steps to reproduce?

Use @hapi/hapi in a Typescript project without having joi installed.

What was the result you got?

node_modules/@hapi/hapi/lib/types/route.d.ts:2:68 - error TS2307: Cannot find module 'joi' or its corresponding type declarations.

2 import { ObjectSchema, ValidationOptions, SchemaMap, Schema } from 'joi';
                                                                     ~~~~~

node_modules/@hapi/hapi/lib/types/server/server.d.ts:4:22 - error TS2307: Cannot find module 'joi' or its corresponding type declarations.

4 import { Root } from 'joi';

What result did you expect?

No compilation errors.

@dominykas dominykas added the bug Bug or defect label Dec 11, 2024
@kanongil
Copy link
Contributor

This is a duplicate of #4491. There is already a pending PR to fix this in #4497.

Note that you can fix this locally by installing the joi dependency yourself, or adding skipLibCheck: false to your tsconfig (with other side effects).

@kanongil kanongil closed this as not planned Won't fix, can't repro, duplicate, stale Dec 11, 2024
@dominykas
Copy link
Contributor Author

Sorry, missed those open issues 🤦

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

No branches or pull requests

2 participants