title: Firebase admin SDK in ionic2: Cannot find module "dns"
body: <p>I'm trying to use Firebase admin SDK as explained <a href="https://firebase.google.com/docs/admin/setup" rel="nofollow noreferrer">here</a> in ionic2. but when I call <code>admin.initializeApp</code>, I get this error: </p>
  
  <pre><code>  import * as admin from "firebase-admin";
    ....
    admin.initializeApp({
    credential: admin.credential.cert({
      projectId: "&lt;PROJECT_ID&gt;",
      clientEmail: "foo@&lt;PROJECT_ID&gt;.iam.gserviceaccount.com",
      privateKey: "-----BEGIN PRIVATE KEY-----\n&lt;KEY&gt;\n-----END PRIVATE KEY-----\n"
    }),
    databaseURL: "https://&lt;DATABASE_NAME&gt;.firebaseio.com"
  });
  
  
  Error: Cannot find module "dns"
  at webpackMissingModule (http://localhost:8101/build/main.js:178777:75)
  at Object.&lt;anonymous&gt; (http://localhost:8101/build/main.js:178777:156)
  at Object.&lt;anonymous&gt; (http://localhost:8101/build/main.js:180128:30)
  at __webpack_require__ (http://localhost:8101/build/main.js:20:30)
  at Object.&lt;anonymous&gt; (http://localhost:8101/build/main.js:178726:18)
  at __webpack_require__ (http://localhost:8101/build/main.js:20:30)
  at Object.&lt;anonymous&gt; (http://localhost:8101/build/main.js:132218:15)
  at Object.internals.rfc3986 (http://localhost:8101/build/main.js:132683:30)
  at __webpack_require__ (http://localhost:8101/build/main.js:20:30)
  at Object.&lt;anonymous&gt; (http://localhost:8101/build/main.js:42488:13)
  </code></pre>
  
  <p>I have installed dns module by <code>npm install dns</code>, but still get this error. Any ideas how I can fix this?</p>