title: Error Loading "@angular/platform-browser-dynamic" from http://localhost:3000/app/main.js
body: <p>I am struggling diagnosing this error. It says it can't load from my main.js but my main.js is loading just fine... I think I am missing an app.set statement. or a reference of some sort, I just dont know what. here is a little bit of my code, I am trying to create a MEAN stack with Angular2 as my front end.</p>
  
  <p><strong>main.ts</strong></p>
  
  <pre><code>import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
  import { AppModule } from './app.module';
  platformBrowserDynamic().bootstrapModule(AppModule);
  </code></pre>
  
  <p><strong>server.ts</strong></p>
  
  <pre><code>en///&lt;reference path="../../typings/index.d.ts"/&gt;
  
  import express = require('express');
  import path = require('path');
  
  let port: number = process.env.port || 3000;
  let app = express();
  
  
  app.set('views', './src/client/views');
  app.set('view engine', 'ejs');
  app.engine('html', require('ejs').renderFile);
  
  app.use("/node_modules", express.static(path.resolve(__dirname, '../../node_modules')));
  app.use("/app", express.static(path.resolve(__dirname, '../../src/client/app')));
  
  app.use("/*.html", function (req, res) {
      res.render(req.params[0] + ".html");
  });
  
  app.get('/', function (req: express.Request, res: express.Response) {
             res.render('index.html')
  })
  
  let server = app.listen(port, function () {
  let host = server.address().address;
  let port = server.address().port;
  
  console.log("Express app is listening on port: " + port);
  });
  </code></pre>
  
  <p>am I not referencing the packages or something?? Thanks ahead of time for any help.</p>
  
  <p><strong>edit:</strong> here is the error....</p>
  
  <pre><code>Error loading http://localhost:3000/@angular/platform-browser-dynamic as "@angular/platform-browser-dynamic" from http://localhost:3000/app/main.js"
  </code></pre>
  
  <p><strong>tscongif</strong></p>
  
  <pre><code>{
   "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "moduleResolution": "node",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "removeComments": false,
    "noImplicitAny": false
   }
  }
  </code></pre>
  
  <p><strong>app.module.ts</strong></p>
  
  <pre><code>import { NgModule }      from '@angular/core';
  import { BrowserModule } from '@angular/platform-browser';
  
  import { AppComponent }  from './app.component';
  
  @NgModule({
    imports: [BrowserModule],
    declarations: [AppComponent],
    bootstrap: [AppComponent]
  })
  export class AppModule { }
  </code></pre>
  
  <p>Also it might be worth knowing that I am following this tutorial <a href="https://blog.sashank.xyz/tutorial-hello-world-mean-stack-app-with-angular-2-mongoose-basic-part-1-2041ffa8b0d3#.mndgsamh2" rel="nofollow"> here </a> but I am using angular 2 rc.5</p>