【发布时间】:2017-08-27 19:23:14
【问题描述】:
我已将我的 angular2 更新到当前版本,但出现以下错误: jasmine 索引文件中似乎存在问题。
[默认] C:\src\Angular2\BuyPracticeTest_AV4\node_modules\@types\jasmine\index.d.ts:40:37 中的错误 参数初始化器只允许在函数或构造函数实现中使用。
[默认] C:\src\Angular2\BuyPracticeTest_AV4\node_modules\@types\jasmine\index.d.ts:40:45 中的错误 找不到名称“keyof”。
[默认] C:\src\Angular2\BuyPracticeTest_AV4\node_modules\@types\jasmine\index.d.ts:40:51 中的错误 '=' 预期。
[默认] C:\src\Angular2\BuyPracticeTest_AV4\node_modules\@types\jasmine\index.d.ts:42:45 中的错误 参数初始化器只允许在函数或构造函数实现中使用。
[默认] C:\src\Angular2\BuyPracticeTest_AV4\node_modules\@types\jasmine\index.d.ts:42:55 中的错误 找不到名称“keyof”。
[默认] C:\src\Angular2\BuyPracticeTest_AV4\node_modules\@types\jasmine\index.d.ts:42:61 中的错误 '=' 预期。
[默认] C:\src\Angular2\BuyPracticeTest_AV4\node_modules\@types\jasmine\index.d.ts:58:41 中的错误 找不到名称“部分”。
[默认] C:\src\Angular2\BuyPracticeTest_AV4\node_modules\@types\jasmine\index.d.ts:99:21 中的错误 找不到名称“部分”。
[默认] C:\src\Angular2\BuyPracticeTest_AV4\node_modules\@types\jasmine\index.d.ts:99:34 中的错误 找不到名称“部分”。
这是我的 package.json 文件:
{
"name": "buy-practice-test",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"start": "ng serve",
"lint": "tslint \"src/**/*.ts\"",
"test": "ng test",
"pree2e": "webdriver-manager update",
"e2e": "protractor"
},
"private": true,
"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",
"angular2-datatable": "^0.5.3",
"core-js": "^2.4.1",
"ng2-pagination": "^0.5.1",
"ng2-table": "^1.3.2",
"rxjs": "5.0.0-beta.12",
"ts-helpers": "^1.1.1",
"zone.js": "^0.6.23"
},
"devDependencies": {
"@types/jasmine": "^2.5.47",
"@types/node": "^6.0.68",
"angular-cli": "1.0.0-beta.18",
"codelyzer": "1.0.0-beta.1",
"jasmine-core": "2.4.1",
"jasmine-spec-reporter": "2.5.0",
"karma": "1.2.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-remap-istanbul": "^0.2.1",
"protractor": "4.0.9",
"ts-node": "1.2.1",
"tslint": "3.13.0",
"typescript": "~2.0.3"
}
}
【问题讨论】:
标签: angular