简体   繁体   English

角度2未满足的对等依赖性

[英]angular 2 unmet peer dependencies

I have an angular2 project created through CLI and my package.json looks like following: 我有一个通过CLI创建的angular2项目,我的package.json如下所示:

{
  "name": "thesis-proto",
  "version": "0.0.0",
  "license": "MIT",
  "angular-cli": {},
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "test": "ng test",
    "pree2e": "webdriver-manager update --standalone false --gecko false",
    "e2e": "protractor"
  },
  "private": true,
  "dependencies": {
    "@angular/common": "^2.3.1",
    "@angular/compiler": "^2.3.1",
    "@angular/core": "^2.3.1",
    "@angular/forms": "^2.3.1",
    "@angular/http": "^2.3.1",
    "@angular/platform-browser": "^2.3.1",
    "@angular/platform-browser-dynamic": "^2.3.1",
    "@angular/router": "^3.3.1",
    "@ng-bootstrap/ng-bootstrap": "^1.0.0-alpha.25",
    "angular2-mdl": "^2.13.2",
    "core-js": "^2.4.1",
    "material-design-lite": "^1.3.0",
    "mdl-stepper": "^1.1.6",
    "ng2-tour": "^0.1.5",
    "rxjs": "^5.0.1",
    "ts-helpers": "^1.1.1",
    "zone.js": "^0.7.2"
  },
  "devDependencies": {
    "@angular/compiler-cli": "^2.3.1",
    "@types/jasmine": "2.5.38",
    "@types/node": "^6.0.42",
    "angular-cli": "1.0.0-beta.28.3",
    "codelyzer": "~2.0.0-beta.1",
    "jasmine-core": "2.5.2",
    "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.13",
    "ts-node": "1.2.1",
    "tslint": "^4.3.0",
    "typescript": "~2.0.3"
  }
}

I am trying to install ng2-tour ( https://isaacplmann.github.io/ng2-tour/ ) when I get following error: 当出现以下错误时,我正在尝试安装ng2-tour( https://isaacplmann.github.io/ng2-tour/ ):

在此处输入图片说明

What exactly I should do? 我到底该怎么办? I do not want to break any existing dependencies. 我不想破坏任何现有的依赖关系。

UNMET PEER DEPENDENCY error is thrown when the dependencies of one or more modules specified in the package.json file is not met. 当不符合package.json文件中指定的一个或多个模块的依赖性时,将引发UNMET PEER DEPENDENCY错误。 Check the warnings carefully and update the package.json file with correct versions of dependencies. 请仔细检查警告,并使用正确版本的依赖项更新package.json文件。

Then run 然后跑

rm -rf node_modules/
npm cache clean
npm install

This will install all the required dependencies correctly. 这将正确安装所有必需的依赖项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM