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

Error TS2709: Cannot use namespace 'Boom' as a type. #248

Closed
dwisetiyadi opened this issue Sep 25, 2019 · 5 comments
Closed

Error TS2709: Cannot use namespace 'Boom' as a type. #248

dwisetiyadi opened this issue Sep 25, 2019 · 5 comments
Assignees
Labels
bug Bug or defect types TypeScript type definitions
Milestone

Comments

@dwisetiyadi
Copy link

dwisetiyadi commented Sep 25, 2019

Hi,

I got this error three days ago, before that days everythings is ok. Actually I didn't yet use Boom, my dependencies:

"@hapi/hapi": "^18.3.1",
"@hapi/inert": "^5.2.1",
"@types/hapi": "^18.0.2",
"@types/hapi__hapi": "^18.2.5",
"@types/hapi__inert": "^5.2.0",

And this the detailed error:

tsc
node_modules/@types/hapi__hapi/index.d.ts(514,32): error TS2709: Cannot use namespace 'Boom' as a type.
node_modules/@types/hapi__hapi/index.d.ts(4050,18): error TS2709: Cannot use namespace 'Boom' as a type.
src/index.ts(7,10): error TS2305: Module '"../node_modules/@hapi/boom/lib"' has no exported member 'serverUnavailable'.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! nodejs@0.1.0 seed: tsc
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the nodejs@0.1.0 tsc script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! nodejs@0.1.0 build:development: tsc && pm2 start ecosystem.config.js --env development --no-daemon
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the nodejs-server-app-vanilla@0.1.0 build:development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Please help...

@hueniverse
Copy link
Contributor

Where is boom being required/imported?

@hueniverse hueniverse self-assigned this Sep 25, 2019
@zamu87
Copy link

zamu87 commented Sep 25, 2019

Hi, i've got the same problem, it's because @hapi/hapi depends on @hapi/boom that now contains types definitions and @types/hapi__hapi depends on @types/hapi__boom that contains different definitions that are not compatible with ones contained in @hapi/boom

@sunknudsen
Copy link

Same, issue appeared after upgrading from @hapi/boom@7.4.3 to @hapi/boom@7.4.10.

@hueniverse hueniverse added bug Bug or defect types TypeScript type definitions labels Sep 25, 2019
hueniverse added a commit that referenced this issue Sep 27, 2019
@hueniverse
Copy link
Contributor

Removed types from 7.x. Will put them back on 8.x. If you have types issues between the new boom types and external DT types, don't upgrade to v8 until the full hapi ecosystem is properly upgraded its types and they are all in sync.

@hueniverse hueniverse added this to the 7.4.11 milestone Sep 27, 2019
@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Bug or defect types TypeScript type definitions
Projects
None yet
Development

No branches or pull requests

4 participants