2016-09-21 21 views
0

我刚刚从rc-6升级到角2最终版。我已经在beta/rc版本中多次升级而没有问题。npm install抱怨已经遇到的未满足的同级代理

我在我的package.json DEPS是:

"dependencies": { 
    "@angular/common": "2.0.0", 
    "@angular/compiler": "2.0.0", 
    "@angular/compiler-cli": "0.6.0", 
    "@angular/core": "2.0.0", 
    "@angular/forms": "2.0.0", 
    "@angular/http": "2.0.0", 
    "@angular/platform-browser": "2.0.0", 
    "@angular/platform-browser-dynamic": "2.0.0", 
    "@angular/platform-server": "2.0.0", 
    "@angular/router": "3.0.0", 
    "@angular/upgrade": "2.0.0", 
    "angular2-cookie": "1.2.3", 
    "bootstrap-sass": "3.3.6", 
    "chart.js": "2.1.6", 
    "core-js": "^2.4.1", 
    "highlight.js": "9.5.0", 
    "marked": "0.3.5", 
    "ng2-bootstrap": "1.1.1", 
    "ng2-charts": "1.2.0", 
    "reflect-metadata": "^0.1.3", 
    "rxjs": "5.0.0-beta.12", 
    "zone.js": "^0.6.23" 
    } 

这符合什么是对目前(截至发稿时)angular 2 setup page

运行NPM安装将安装一切,但我在最后得到了一堆错误:

219946 error code EPEERINVALID 
219947 error peerinvalid The package @angular/[email protected] does not satisfy its siblings' peerDependencies requirements! 
219947 error peerinvalid Peer @angular/[email protected] wants @angular/[email protected]^2.0.0 
219947 error peerinvalid Peer @angular/[email protected] wants @angular/[email protected]^2.0.0 
219947 error peerinvalid Peer @angular/[email protected] wants @angular/[email protected]^2.0.0 
219947 error peerinvalid Peer @angular/[email protected] wants @angular/[email protected]^2.0.0 
219947 error peerinvalid Peer @angular/[email protected] wants @angular/[email protected]^2.0.0 
219947 error peerinvalid Peer [email protected] wants @angular/[email protected] 
219947 error peerinvalid Peer [email protected] wants @angular/[email protected] 
219948 verbose exit [ 1, true ] 

正如你可以在我的package.json看到,我在@角/常见@ 2.0。 0,并且没有比当前可用的版本更高的版本。目前的设置确实是而不是推荐使用^2.0.0,但我试过了,无济于事。

我也尝试过在我的整个node_modules目录下,同时在其他任何地方安装@ angular/common,都没有成功。我是愚蠢的还是还有其他事情在这里?

回答

0

我做了一些测试,能够重现此错误,当我运行npm install只有一个package.json文件。在您的angular 2项目中运行npm install之前,您应该有4个文件。在angular.io你需要复制了以下文件...

-package.json

-tsconfig.json

-typing.json

-systemjs.config.js

将所有这些文件复制到项目中后,再次运行NPM安装。 (该文件嵌套在标签只是在教程中的package.json文件以上)

0

要么东西了故宫:

npm install -g npm 
    npm cache clean 
    npm update -g 
    npm install 

或者,也许是因为NG2,引导和NG2,图表前-REQ旧版本@ angular/common有什么问题呢?尝试新的版本?:

"ng2-bootstrap": "1.1.5", 
    "ng2-charts": "1.3.0", 
相关问题