title: Uncaught SyntaxError: Unexpected token < VM105:17Uncaught ReferenceError: System is not defined
body: <p>I am serving my index.html from nodejs server. This ng2 file works fine with the live-server. but when I load it from nodejs index.js with specific routes it gives the following error.</p>
  
  <pre><code>Uncaught SyntaxError: Unexpected token &lt;
  VM105:17Uncaught ReferenceError: System is not defined
  </code></pre>
  
  <p>I have loaded the files right. Here are the loaded files:</p>
  
  <pre><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.33.3/es6-shim.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.16/system-polyfills.js"&gt;&lt;/script&gt;
  &lt;script src="node_modules/angular2/bundles/angular2-polyfills.js"&gt;&lt;/script&gt;
  &lt;script src="node_modules/systemjs/dist/system.src.js"&gt;&lt;/script&gt;
  &lt;script src="node_modules/rxjs/bundles/Rx.min.js"&gt;&lt;/script&gt;
  &lt;script src="node_modules/angular2/bundles/angular2.min.js"&gt;&lt;/script&gt;
  &lt;script src="node_modules/angular2/bundles/router.js"&gt;&lt;/script&gt;
  &lt;script src="node_modules/angular2/bundles/http.js"&gt;&lt;/script&gt;
  
  &lt;!-- 2. Configure SystemJS and Import --&gt;
  &lt;script&gt;
      System.config({
      packages: {        
        client: {
          format: 'register',
          defaultExtension: 'js'
        }
      }
    });
    System.import('client/boot')
          .then(null, console.error.bind(console));
  &lt;/script&gt;
  </code></pre>
  
  <p>What am I missing? All the files are served from the node server.</p>