You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using the framework for the first time, I encountered a minor issue. It's not critical (in my case, I will simply install joi), but I thought you might want to be aware of it. Have a good day!
reproduction
In a new node.js project:
install @hapi/hapi
create a server.ts file with the content:
importHapifrom"@hapi/hapi";asyncfunctioninit(){constserver=Hapi.server({port: 3000,host: 'localhost'});awaitserver.start();console.log('Server running on %s',server.info.uri);};init();
you get the following error:
> tsc
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';~~~~~
Found 2 errors in 2 files.
Errors Files
1 node_modules/@hapi/hapi/lib/types/route.d.ts:2
1 node_modules/@hapi/hapi/lib/types/server/server.d.ts:4
context
While using the framework for the first time, I encountered a minor issue. It's not critical (in my case, I will simply install
joi
), but I thought you might want to be aware of it. Have a good day!reproduction
In a new node.js project:
note :
npm i joi
resolves the error.a possible fix
hapi/lib/types/route.d.ts
Line 2 in 23d6550
could it be?
The text was updated successfully, but these errors were encountered: