I\'m doing the Angular2 5 minute quick start.
About half way through the tutorial now, I have the following files setup correctly:
If you are following the Upgrade to Angular2 tutorial, this may bite you:
Make sure you are not still manually loading your converted javascript files when you convert the files to typescript and use the module loaders to load them.
I had converted some files to TS, but was still loading the original (now transpiled) JS files in the index.html. If you do this, you'll keep getting "require is not defined" because the "require" library hasn't been loaded yet.
Bottom line: So, if you get "require is not defined" put a debugger statement before the offending line (for me, it was import { Injectable } from '@angular/core' ), look at what source files have been loaded and make sure you're not still loading the file manually.