(New Hampton, IA) - I have been requesting books to be sent to a residential facility for troubled teens. So, assuming the folder where my transpiled files are would be "my/app/public" and "app_main_file" is the main js file of my application, then I should've actually had something like this: System.Geri B. It turns out that in the packages object, each key actually represents a path (where does that package - it's files - reside within your application). My mistake was thinking that the key "app" is simply a generic key, comming from the word "application". System.import('my/path/to/app_main_file')
The problem was in my nfig() - in the packages section.
But it wouldn't have made me realize the problem in my specific case and I wouldn't have understood how System.js works. If I had, it would have worked by simply following the angular 2 quickstart. I did mention I had a custom folder structure and wasn't willing to change it. I did realize what the final problem was (other than what I've already edited in the original question). I know it's long overdue, but perhaps others might benefit from an answer. This is disappointing nevertheless, I hoped that importing M圜omponent into app.ts would be everything, and that I would find the M圜omponent class + everything from M圜omponent.ts + my transcompiled app.ts file ALL IN ONE app.js file, not haveing yet another js file :( I have the feeling that I should do one more thing with the transcompiled file "M圜omponent.js", but don't know what (I've tried to add it to System.import, hoping it would accept an array. System.import('resources/dist/js/app.js') Respectively: XHR error (404 Not Found) loading Don't be thrown off by the path (when comparing to my project folder structure), I have my local server pointing at /app when I access This is my index.html with system config and all included js files: When I try running in the browser, I check my console and both systemjs and angular2-pollyfills scream: 404 (Not Found) Thank you inoabrian, but now I have another issue. | /modules // files copied from the /node_modules/**/ folders (because node_modules is outside versioning and also outside public root (public root is the /app folder) | M圜omponent.js // transcompiled M圜omponent.ts d.ts file), but when trying to compile app.ts it still gives the same TS2307 error. Others wrote "run tsc -declaration M圜omponent.ts" - which does generate a M圜omponent.d.ts file (while throwing errors in the console, like "Cannot compile unless the -module flag is provided" - which IS provided in tsconfig as an option - or "Cannot find module 'angular2/common'" for whatever I am importing in M圜omponent.ts - but it does generate a. Some people wrote: use "moduleResolution": "classic", but if I do that then I get the TS2307 error for everything else (all angular2/.) except M圜omponent. I'm trying to import a custom component within my app.ts, but getting the error " TS2307: Cannot find module 'M圜omponent'" I've looked it over, couldn't find anything that would help me.