title: Angular2 components.map is not a function
body: <p>When trying to load an angular webpage, the following error is thrown</p>
  
  <pre><code>[1] /Users/dylan/IdeaProjects/angular2-ui-prototype/code/node_modules/angular2-universal/dist/node/bootloader.js:246
  [1]         var directives = components.map(function (component) {
  [1]                                     ^
  [1]
  [1] TypeError: components.map is not a function 
  </code></pre>
  
  <p>I'm not sure why this error is occuring.</p>
  
  <p>node version: 4.1.2</p>
  
  <p>I can do an <code>npm run build</code> without any issues, and <code>npm run watch</code>only throws the error once I actually load the page. </p>
  
  <p>This problem started happening after I ran <code>npm install</code> after I had cleared both <code>dist</code>and `node_modules. </p>
  
  <p>(The complete command used was: <code>rm -rf dist/ node_modules/ &amp;&amp; npm i &amp;&amp; npm run build &amp;&amp; npm run watch &amp;&amp; npm run watch</code>)</p>
  
  <p>I made the assumption that it was <em>maybe</em> due to the version of node, so I did try this with version 4.4.1 as well, and had the same result.</p>
  
  <p>When I scroll up, I do get a bunch of warnings like these:</p>
  
  <p><code>npm WARN install:ansi@0.3.1 ENOENT: no such file or directory, rename '/Users/dylan/.nvm/versions/node/v4.4.1/lib/node_modules/.staging/ansi-67bd84a7' -&gt; '/Users/dylan/.nvm/versions/node/v4.4.1/lib/node_modules/nodemon/node_modules/fsevents/node_modules/ansi'</code></p>
  
  <p>I get a <em>lot</em> of these warnings so I doubt renaming them is the propper way. I could also throw everything away in that folder, and start over, but I'm not sure if at this point I'll do more bad than good :-)</p>
  
  <p>Anything pointing me in the right direction would be greatly appreciated.</p>