Fisher
Fisher

Reputation: 21

Angular2/4 : Fetch error: 401 Unauthorized

I have recently updated the project from angular2 to angular4 and updated typescript to version 2.2.2

now i am getting this error below when start the application. any ideas why ?

GET http://localhost/myWEb/Scripts/app/main.js 401 (Unauthorized)

(anonymous) @   zone.js:879
fetchFetch  @   system.src.js:1495
(anonymous) @   system.src.js:3421
ZoneDelegate.invoke @   zone.js:365
Zone.run    @   zone.js:125
(anonymous) @   zone.js:758
ZoneDelegate.invokeTask @   zone.js:398
Zone.runTask    @   zone.js:165
drainMicroTaskQueue @   zone.js:591



 Error: Fetch error: 401 Unauthorized
  Instantiating http://localhost/myWEb/Scripts/app/main.js
  Loading app/main
    at Scripts/vendor/systemjs/dist/system.src.js:1500:13 [<root>]
    at Scripts/vendor/zone.js/dist/zone.js:758:57 [<root>]
    at drainMicroTaskQueue (zone.js:591) [<root>]

Upvotes: 1

Views: 1709

Answers (1)

Igor
Igor

Reputation: 76

Check systemjs in package.json. It should be version 0.19.46 instead of anything newer. This problem raises in chrome, but with Edge everything fine even with latest systemjs

Upvotes: 3

Related Questions