-
Notifications
You must be signed in to change notification settings - Fork 126
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
Hapi auth jwt typescript bug #310
Comments
This affects previous versions too. Need a fix |
PRs very much welcome. |
I like the practice "one who broke it fixes it". I have version 8.1.0 installed in my package.json. When I delete node_modules and do a fresh install it gives me this error on build:
Most people use CI/CD, in our case we use Jenkins, so fresh build happens every time as well as this error. My PR would be rolling back this PR https://github.com/dwyl/hapi-auth-jwt2/pull/307/files until this bug is fixed because it is breaking previous versions |
@jaulz Yes, but even if I replace it with @hapi/hapi this is still an issue. I'm using Glue so I think that is what is causing the problem.
By the way, this only works if I user require instead of import. Otherwise it gives me an error:
|
I think it should rather be |
In that case, I will get this error:
|
And what about this?
By the way, which hapi types are you using? |
I'm using @types/hapi__hapi. Error:
|
Right, that was my fault. Which glue types are you using? |
I use "@types/glue": "^5.0.3", |
Then should you probably also use |
Yep, that works. |
There is problem with types in last version.
when I do
tsc --traceResolution
get error:
node_modules/hapi-auth-jwt2/lib/index.d.ts(1,66): error TS2307: Cannot find module '@hapi/hapi'.
With old version: 8.1.0 works fine.
The text was updated successfully, but these errors were encountered: