Ionic 2 cannot find module 'dgram' : <p>I have installed a template Ionic 2 application and want to add the NPM package <code>bonjour</code></p>

<p>After installing and including the package in my component like this:</p>

<pre><code>var Bonjour = require('bonjour');
var bonjour = new Bonjour();
</code></pre>

<p>The application won't run stating 'cannot find module dgram'</p>

<p>The application has both the bonjour package and bonjour types installed. </p>

<p><strong>The problem</strong></p>

<p>The application can't find the module dgram which is located in the @types/node file. The project is running <strong>TS 2.4.2</strong>  and should not need any references to the @types, this should be picked up automatically.</p>

<p><strong>What have I tried</strong></p>

<p>I tried including the @types folder anyway in multiple ways, by setting typeroots or types in the ts.config.json file. This didn't change anything.</p>

<p>I tried specifying types : </p>

<pre><code>"types": ["node", "bonjour"]
</code></pre>

<p>I tried reinstalling all node modules and clearing the cache</p>

<p>I tried including a reference path in my component above the require statement:</p>

<pre><code>/// &lt;reference path="node_modules/@types/node/index.d.ts" /&gt;

var Bonjour = require('bonjour');
var bonjour = new Bonjour();
</code></pre>

<p>This all did not help. Any ideas on how to make my application load this module properly?</p>
