Angular2 FileSaver.js - Cannot find module 'file-saver' : <p>I am working on moving an angular 1.x site to a new angular 2.0 site I created the site using angular-cli 1.0.0-beta.15. </p>

<p>I have a button to export some data to a CSV file. When the page first loads I  get an error message "Cannot find module 'file-saver'", but when I click the button everything works perfectly. </p>

<p>I have the FileSaver.js component installed:</p>

<p>package.json</p>

<pre><code>...
"dependencies": {
  ...
  "@types/filesaver": "0.0.30",
  "file-saver": "^1.3.2"
  ...
}
...
</code></pre>

<p>in my export.service.ts:</p>

<pre><code>import { saveAs } from 'file-saver';
...
let file = new Blob(['hello world'], { type: 'text/csv;charset=utf-8' });
saveAs(file, 'helloworld.csv');
...
</code></pre>

<p>Does anyone know how to resolve this error?</p>
