Skip to content Skip to sidebar Skip to footer

Duplicate Identifier Error When Referencing A Node Library Using Typescript

I'm new to typescript and trying to start a hapi.js project but I'm getting an error when trying require('boom') in my code Duplicate identifier 'Boom' /// import or export in your file then as far as TypeScript is concerned you file is a part of a global namespace and therefore you are getting a name collision on Boom. Fix: use import/require instead of var/require.

import Boom = require('boom');

To learn more : https://www.youtube.com/watch?v=KDrWLMUY0R0&hd=1


Post a Comment for "Duplicate Identifier Error When Referencing A Node Library Using Typescript"