找不到'core-js'的types定义文件

我正在用angular-cli构build一个angular2应用程序。 angular-in-memory-web-api未被默认安装。

所以我search了它,并在我的package.json文件中添加了这一行"angular-in-memory-web-api": "~0.1.5" 。 并没有npm install

现在我有这个问题。

 ERROR in [default] /home/adil/Code/AngularJS.2/cli-based/mz-doc-app/node_modules/angular-in-memory-web-api/in-memory-backend.service.d.ts:1:0 Cannot find type definition file for 'core-js'. 

请提出一些解决scheme?

package.json

 { "name": "mz-doc-app", "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.1.0", "@angular/compiler": "~2.1.0", "@angular/core": "~2.1.0", "@angular/forms": "~2.1.0", "@angular/http": "~2.1.0", "@angular/material": "^2.0.0-alpha.9-3", "@angular/platform-browser": "~2.1.0", "@angular/platform-browser-dynamic": "~2.1.0", "@angular/router": "~3.1.0", "@types/core-js": "^0.9.34", "angular-in-memory-web-api": "~0.1.5", "core-js": "^2.4.1", "rxjs": "5.0.0-beta.12", "ts-helpers": "^1.1.1", "zone.js": "^0.6.23" }, "devDependencies": { "@types/jasmine": "^2.2.30", "@types/node": "^6.0.42", "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" } } 

       

网上收集的解决方案 "找不到'core-js'的types定义文件"

我通过删除第一行来解决这个问题/// <reference types="core-js" /> node_modules/angular-in-memory-web-api/in-memory-backend.service.d.ts /// <reference types="core-js" />

这不是一个永久的解决scheme,但等待一个修复( https://github.com/angular/in-memory-web-api/issues/62

我有一个类似的问题使用webpack。 从0.1.10版开始,对in-mem-web-api进行了一些改变。

https://github.com/angular/in-memory-web-api/blob/master/CHANGELOG.md#0113-2016-10-20

将web api更改为版本0.1.9会清除我的症状。 (我是一个angular度noob,所以不幸的是不知道永久解决scheme)。