I have an SPA that was on @angular RC5 which I am trying to move up to the official release. Before the move, everything seemed to work fine in development. No errors in the chrome debug console.
Now I have changed my package.json to:
"dependencies": {
"@angular/common": "~2.0.1",
"@angular/compiler": "~2.0.1",
"@angular/core": "~2.0.1",
"@angular/forms": "~2.0.1",
"@angular/http": "~2.0.1",
"@angular/platform-browser": "~2.0.1",
"@angular/platform-browser-dynamic": "~2.0.1",
"@angular/router": "~3.0.1",
"es6-shim": "^0.35.0",
"lodash": "^4.14.1",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
"systemjs": "0.19.27",
"underscore": "^1.8.3",
"zone.js": "^0.6.12"
},
I also cleaned up a bunch of ROUTER_PROVIDER references, removed all multi line comments. However now when I run my app:
zone.js:1274 GET http://localhost:3002/traceur 404 (Not Found)scheduleTask @ zone.js:1274ZoneDelegate.scheduleTask @ zone.js:216Zone.scheduleMacroTask @ zone.js:153(anonymous function) @ zone.js:1304send @ VM1437:3fetchTextFromURL @ system.src.js:1156(anonymous function) @ system.src.js:1739ZoneAwarePromise @ zone.js:478(anonymous function) @ system.src.js:1738(anonymous function) @ system.src.js:2764(anonymous function) @ system.src.js:3338(anonymous function) @ system.src.js:3605(anonymous function) @ system.src.js:3990(anonymous function) @ system.src.js:4453(anonymous function) @ system.src.js:4705(anonymous function) @ system.src.js:408ZoneDelegate.invoke @ zone.js:203Zone.run @ zone.js:96(anonymous function) @ zone.js:462ZoneDelegate.invokeTask @ zone.js:236Zone.runTask @ zone.js:136drainMicroTaskQueue @ zone.js:368ZoneTask.invoke @ zone.js:308
zone.js:355 Unhandled Promise rejection: Error: XHR error (404 Not Found) loading http://localhost:3002/traceur
at XMLHttpRequest.wrapFn [as _onreadystatechange] (http://localhost:3002/vendor/zone.js/dist/zone.js:647:29)
at ZoneDelegate.invokeTask (http://localhost:3002/vendor/zone.js/dist/zone.js:236:37)
at Zone.runTask
(http://localhost:3002/vendor/zone.js/dist/zone.js:136:47)
at XMLHttpRequest.ZoneTask.invoke (http://localhost:3002/vendor/zone.js/dist/zone.js:304:33)
Error loading http://localhost:3002/traceur
Error loading http://localhost:3002/vendor/@angular/platform-browser-dynamic/index.js as "@angular/platform-browser-dynamic" from http://localhost:3002/app/main.js ; Zone: <root> ; Task: Promise.then ; Value: Error: Error: XHR error (404 Not Found) loading http://localhost:3002/traceur(…) nullconsoleError @ zone.js:355_loop_1 @ zone.js:382drainMicroTaskQueue @ zone.js:386ZoneTask.invoke @ zone.js:308
zone.js:357 Error: Uncaught (in promise): Error: Error: XHR error (404 Not Found) loading http://localhost:3002/traceur(…)consoleError @ zone.js:357_loop_1 @ zone.js:382drainMicroTaskQueue @ zone.js:386ZoneTask.invoke @ zone.js:308
13system.src.js:373 Assertion failed: loading or loaded(anonymous function) @ system.src.js:373ZoneDelegate.invoke @ zone.js:203Zone.run @ zone.js:96(anonymous function) @ zone.js:462ZoneDelegate.invokeTask @ zone.js:236Zone.runTask @ zone.js:136drainMicroTaskQueue @ zone.js:368ZoneTask.invoke @ zone.js:308
I've looked through a number of posts with a similar problem, but I'm at a loss as to what is causing this?
traceur 404 is an indication that Angular is not able to find/load required thing(s) or package(s). Through your post, I can suggest you below things only.
1) package.json is not correct. Please compare it with package.json here.
2) zone.js requires higher version for Angular2.0.1.
3) es6-shim": "^0.35.0" shim is not required anymore with latest version. Remove your reference from index.html as well.
Other than these, there can be many other things which can cause problem. But it is hard to say as of now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With