我最近将项目从angular2更新为angular4,并将typescript更新为版本2.2.2
现在我在启动应用程序时遇到此错误。任何想法为什么?
获取http://localhost/myWEb/Scripts/app/main.js 401(未经授权)
(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>]
答案 0 :(得分:3)
检查package.json中的systemjs。它应该是版本0.19.46而不是更新的版本。这个问题在chrome中提出,但是即使使用最新的systemjs,Edge也一切都很好