“区域战争犯”;意外标记<&引用;启动angular 2应用程序后
我在启动angular 2应用程序后出错。导致错误的原因是什么?如何修复?当我在main.ts中需要@angular/core时,它看起来会发生“区域战争犯”;意外标记<&引用;启动angular 2应用程序后,angular,typescript,Angular,Typescript,我在启动angular 2应用程序后出错。导致错误的原因是什么?如何修复?当我在main.ts中需要@angular/core时,它看起来会发生 "SyntaxError: Unexpected token < at eval (<anonymous>) at SystemJSLoader.__exec (http://localhost:5555/node_modules/systemjs/dist/system.src.js?1501265527981:15
"SyntaxError: Unexpected token <
at eval (<anonymous>)
at SystemJSLoader.__exec (http://localhost:5555/node_modules/systemjs/dist/system.src.js?1501265527981:1506:18)
at entry.execute (http://localhost:5555/node_modules/systemjs/dist/system.src.js?1501265527981:3647:16)
at linkDynamicModule (http://localhost:5555/node_modules/systemjs/dist/system.src.js?1501265527981:3247:32)
at linkDynamicModule (http://localhost:5555/node_modules/systemjs/dist/system.src.js?1501265527981:3241:11)
at getModule (http://localhost:5555/node_modules/systemjs/dist/system.src.js?1501265527981:3215:9)
at http://localhost:5555/node_modules/systemjs/dist/system.src.js?1501265527981:3251:16
at require (http://localhost:5555/node_modules/systemjs/dist/system.src.js?1501265527981:3888:29)
at Object.eval (http://localhost:5555/app/main.js:2:14)
at eval (http://localhost:5555/app/main.js:13:4)
at eval (http://localhost:5555/app/main.js:14:3)
at eval (<anonymous>)
at SystemJSLoader.__exec (http://localhost:5555/node_modules/systemjs/dist/system.src.js?1501265527981:1506:18)
at entry.execute (http://localhost:5555/node_modules/systemjs/dist/system.src.js?1501265527981:3921:18)
at linkDynamicModule (http://localhost:5555/node_modules/systemjs/dist/system.src.js?1501265527981:3247:32)"
package.json
...
"dependencies": {
"@angular/common": "^2.4.10",
"@angular/compiler": "^2.4.10",
"@angular/core": "^2.4.10",
"@angular/forms": "^2.4.10",
"@angular/http": "^2.4.10",
"@angular/platform-browser": "^2.4.10",
"@angular/platform-browser-dynamic": "^2.4.10",
"@angular/router": "^3.4.10",
...
是的,我已经检查了网络选项卡,所有内容都返回js。我会再次检查。我同意@Jake,无论何时我遇到这个问题,它都是在网络方面,或者至少是从外部来源收到的。是的,我已经检查了网络选项卡,所有内容都返回js。我会再次检查。我同意@Jake,每当我遇到这个问题时,它都是在网络方面,或者至少是我从外部来源收到的。
...
"dependencies": {
"@angular/common": "^2.4.10",
"@angular/compiler": "^2.4.10",
"@angular/core": "^2.4.10",
"@angular/forms": "^2.4.10",
"@angular/http": "^2.4.10",
"@angular/platform-browser": "^2.4.10",
"@angular/platform-browser-dynamic": "^2.4.10",
"@angular/router": "^3.4.10",
...