0
如果安裝了@angular/compiler-cli
,則運行karma-jasmine測試時顯示錯誤。如果我不會安裝@angular/compiler-cli
測試工作正常,但我需要編譯器cli,因爲我需要使用ng-xi18n。如果我刪除@angular/tsc-wrapped
,我可以運行測試,但不能運行ng-xi18n。正在安裝@ angular/compiler-cli,@ angular/tsc-wrapped break karma -jasmine test
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'
的package.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",
....
http://plnkr.co/edit/x3tZ1Vm8WNt0WYGv2Dt7?p=preview