运行 karma-jasmine 测试会引发错误(如果@angular/compiler-cli
已安装)。如果我不安装@angular/compiler-cli
测试工作正常,但我需要编译器-cli,因为我需要使用 ng-xi18n。如果我删除@angular/tsc-wrapped
,我可以运行测试,但不能运行 ng-xi18n。
28 11 2016 14:06:52.990:WARN [web-server]: 404: /base/typescript.js
28 11 2016 14:06:53.026:WARN [web-server]: 404: /base/typescript.js
28 11 2016 14:06:53.031:WARN [web-server]: 404: /base/fs.js
28 11 2016 14:06:53.053:WARN [web-server]: 404: /base/path.js
'(SystemJS) XHR error (404 Not Found) loading http://localhost:9876/base/typescript.js
Error loading http://localhost:9876/base/typescript.js as
"typescript"
from http://localhost:9876/base/node_modules/@angular/tsc-wrapped/test/collector.spec.js'
包.json:
.....
"dependencies": {
"@angular/common": "2.2.3",
"@angular/compiler": "2.2.3",
"@angular/core": "2.2.3",
"@angular/forms": "2.2.3",
"@angular/http": "2.2.3",
"@angular/platform-browser": "2.2.3",
"@angular/platform-browser-dynamic": "2.2.3",
"@angular/upgrade": "2.2.3",
"@angular/router": "3.2.3",
"core-js": "2.4.1",
"reflect-metadata": "0.1.8",
"rxjs": "5.0.0-beta.12",
"systemjs": "0.19.39",
"zone.js": "0.6.25",
"bootstrap": "3.3.7"
},
"devDependencies": {
"@angular/compiler-cli": "2.2.3",
....