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 · 4 comments
Assignees
Labels
Milestone

Comments

@dwisetiyadi
Copy link

@dwisetiyadi 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

This comment has been minimized.

Copy link
Member

@hueniverse hueniverse commented Sep 25, 2019

Where is boom being required/imported?

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

This comment has been minimized.

Copy link

@zamu87 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

This comment has been minimized.

Copy link

@sunknudsen sunknudsen commented Sep 25, 2019

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

hueniverse added a commit that referenced this issue Sep 27, 2019
@hueniverse

This comment has been minimized.

Copy link
Member

@hueniverse hueniverse commented Sep 27, 2019

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 closed this Sep 27, 2019
@hueniverse hueniverse added this to the 7.4.11 milestone Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.