执行npm install
后,我遇到了错误:
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package rxjs does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer @angular/core@2.0.0-rc.4 wants rxjs@5.0.0-beta.6
npm ERR! peerinvalid Peer angular2@2.0.0-beta.15 wants rxjs@5.0.0-beta.2
npm ERR! peerinvalid Peer @angular/router@3.0.0-beta.2 wants rxjs@5.0.0-beta.6
npm ERR! peerinvalid Peer @angular/http@2.0.0-rc.4 wants rxjs@5.0.0-beta.6
npm ERR! Please include the following file with any support request:
npm ERR! c:\GIT\mas\Rapid\factory\npm-debug.log
这是package.json
:
{
"name": "sdk",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"postinstall": "typings install && bower install --production && jspm install && node src/tools/updateDependencies.js && npm run bundle-dep",
"_jspm": "jspm install",
"_postjspm": "node src/tools/updateDependencies.js && npm run bundle-dep",
"bundle-dep": "jspm bundle \"src - [src/**/*] - [components/**/*]\" www/bundle.js",
"start": "node dev-server.js"
},
"author": "",
"license": "ISC",
"dependencies": {},
"devDependencies": {
"@angular/common": "2.0.0-rc.4",
"@angular/compiler": "2.0.0-rc.4",
"@angular/core": "2.0.0-rc.4",
"@angular/forms": "0.2.0",
"@angular/http": "2.0.0-rc.4",
"@angular/platform-browser": "2.0.0-rc.4",
"@angular/platform-browser-dynamic": "2.0.0-rc.4",
"@angular/router": "3.0.0-beta.2",
"bower": "^1.7.9",
"chokidar-socket-emitter": "^0.3.1",
"express": "^4.13.4",
"jspm": "^0.17.0-beta.12",
"open": "0.0.5",
"rxjs": "5.0.0-beta.2",
"spdy": "^3.2.3",
"typings": "^0.7.12"
},
"jspm": {
"name": "sdk",
"directories": {
"lib": "src"
},
"dependencies": {
"@angular/forms": "npm:@angular/forms@^0.2.0",
"@angular/http": "npm:@angular/http@^2.0.0-rc.4",
"@angular/router": "npm:@angular/router@^3.0.0-beta.2",
"core-js": "npm:core-js@^2.4.1",
"es6-shim": "github:es-shims/es6-shim@^0.35.0",
"json": "github:systemjs/plugin-json@^0.1.0",
"systemjs-hot-reloader": "github:capaj/systemjs-hot-reloader@^0.5.6"
},
"devDependencies": {
"os": "github:jspm/nodelibs-os@^0.2.0-alpha",
"plugin-typescript": "github:frankwallis/plugin-typescript@^4.0.5"
},
"peerDependencies": {
"@angular/common": "npm:@angular/common@^2.0.0-rc.4",
"@angular/compiler": "npm:@angular/compiler@^2.0.0-rc.4",
"@angular/core": "npm:@angular/core@^2.0.0-rc.4",
"@angular/platform-browser": "npm:@angular/platform-browser@^2.0.0-rc.4",
"@angular/platform-browser-dynamic": "npm:@angular/platform-browser-dynamic@^2.0.0-rc.4",
"assert": "github:jspm/nodelibs-assert@^0.2.0-alpha",
"fs": "github:jspm/nodelibs-fs@^0.2.0-alpha",
"net": "github:jspm/nodelibs-net@^0.2.0-alpha",
"path": "github:jspm/nodelibs-path@^0.2.0-alpha",
"process": "github:jspm/nodelibs-process@^0.2.0-alpha",
"reflect-metadata": "npm:reflect-metadata@0.1.2",
"rxjs": "npm:rxjs@5.0.0-beta.6",
"tty": "github:jspm/nodelibs-tty@^0.2.0-alpha",
"util": "github:jspm/nodelibs-util@^0.2.0-alpha",
"zone.js": "npm:zone.js@^0.6.6"
},
"overrides": {
"npm:@angular/common@2.0.0-rc.4": {
"meta": {
"src/*.js": {
"deps": [
"reflect-metadata",
"zone.js"
]
}
}
},
"npm:@angular/compiler@2.0.0-rc.4": {
"meta": {
"src/*.js": {
"deps": [
"reflect-metadata",
"zone.js"
]
}
}
},
"npm:@angular/core@2.0.0-rc.4": {
"meta": {
"src/*.js": {
"deps": [
"reflect-metadata",
"zone.js"
]
}
}
},
"npm:@angular/http@2.0.0-rc.4": {
"meta": {
"src/*.js": {
"deps": [
"reflect-metadata",
"zone.js"
]
}
}
},
"npm:@angular/platform-browser-dynamic@2.0.0-rc.4": {
"meta": {
"src/*.js": {
"deps": [
"reflect-metadata",
"zone.js"
]
}
}
},
"npm:@angular/platform-browser@2.0.0-rc.4": {
"meta": {
"src/*.js": {
"deps": [
"reflect-metadata",
"zone.js"
]
}
}
},
"npm:debug@2.2.0": {
"main": "browser.js",
"jspmNodeConversion": false,
"format": "cjs",
"map": {
"./browser.js": {
"node": "./node.js"
},
"fs": "@node/fs",
"net": "@node/net",
"tty": "@node/tty",
"util": "@node/util"
}
},
"npm:ms@0.7.1": {
"jspmNodeConversion": false,
"format": "cjs"
},
"npm:reflect-metadata@0.1.2": {
"map": {
"crypto": "@empty"
}
},
"npm:typescript@1.8.9": {
"browser": {},
"map": {
"buffer": "@empty",
"child_process": "@empty",
"fs": "@empty",
"path": "@empty",
"process": "@empty",
"readline": "@empty"
}
}
}
}
}
我尝试将"rxjs": "5.0.0-beta.2"
升级到"rxjs": "5.0.0-beta.6"
下的devDependencies
,但它给了我:
npm ERR! peerinvalid The package rxjs does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer angular2@2.0.0-beta.15 wants rxjs@5.0.0-beta.2
npm ERR! peerinvalid Peer @angular/core@2.0.0-rc.4 wants rxjs@5.0.0-beta.6
npm ERR! peerinvalid Peer @angular/http@2.0.0-rc.4 wants rxjs@5.0.0-beta.6
npm ERR! peerinvalid Peer @angular/router@3.0.0-beta.2 wants rxjs@5.0.0-beta.6
答案 0 :(得分:0)
此项目中实际安装了两个版本的Angular 2。旧(angular2
)和新(@angular
)。
所以我通过这个命令卸载旧的:
npm uninstall angular2
然后重试:
npm install
然后:
npm start