gizm0bill / angular2-rest-client

MIT License
8 stars 5 forks source link

SystemJS XHR error while running application #1

Closed jerno closed 7 years ago

jerno commented 7 years ago

Description: Getting error when running application (with "angular2-rest-client" dependency)

Error: (SystemJS) XHR error (404 Not Found) loading http://localhost:3000/traceur Error loading http://localhost:3000/node_modules/angular2-rest-client/index.js as "angular2-rest-client" from http://localhost:3000/app/app.service.js

Steps To Reproduce: 1) npm install angular2-rest-client 2) add it to dependencies 3) Seen an error Error loading http://localhost:3000/node_modules/angular2-rest-client/index.js as "angular2-rest-client"

Comment: It looks like the content of index.js isn't a valid javascript. Maybe it's not transpiled to JS?

index.js of the v1.0.9 is:

export * from './src/angular2-rest-client';  
//# sourceMappingURL=index.js.map
gizm0bill commented 7 years ago

Actually it only works if bundling with something like webpack. I'll make an umd bundle soon! Thanks!

gizm0bill commented 7 years ago

I've added the UMD bundle, should work with System.js just like in the angular2 quickstart tutorial.