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

Invalid module name in augmentation- index.d.ts #23

Closed
janders4 opened this issue Nov 7, 2019 · 6 comments
Closed

Invalid module name in augmentation- index.d.ts #23

janders4 opened this issue Nov 7, 2019 · 6 comments

Comments

@janders4
Copy link

janders4 commented Nov 7, 2019

Hi, i'm looking for some help with the following issue:

Using

joi-extract-type: 15.0.1
@hapi/joi": 15.1.1

I'm importing in with the following:
import 'joi-extract-type'

In the node module file index.d.ts i'm having the following error:
module "@hapi/joi"
Invalid module name in augmentation. Module '@hapi/joi' resolves to an untyped module at '/Users/johnanderson/Documents/GitHub/error-handling-class-spike/node_modules/@hapi/joi/lib/index.js', which cannot be augmented.ts(2665)

Thanks

John

@TCMiranda
Copy link
Owner

Uhmm @janders4 can you try installing also @types/hapi__joi ?

@evanshortiss
Copy link

@TCMiranda I've just run into the same issue. It looks like they've changed the definitions recently so I think it's linked to that.

@evanshortiss
Copy link

Here's the error I'm seeing:

node_modules/joi-extract-type/dist/index.d.ts:9:16 - error TS2649: Cannot augment module 'Joi' with value exports because it resolves to a non-module entity.

@TCMiranda
Copy link
Owner

Hello @evanshortiss you are right, i'll update the package.json dependencies to disallow those definitions.

@TCMiranda
Copy link
Owner

Updated on 15.0.2, if you could test on your setup, it would be awesome.
Thanks

@janders4
Copy link
Author

@TCMiranda, thanks, all is working now

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

No branches or pull requests

3 participants