完成后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/[email protected] wants [email protected]
npm ERR! peerinvalid Peer [email protected] wants [email protected]
npm ERR! peerinvalid Peer @angular/[email protected] wants [email protected]
npm ERR! peerinvalid Peer @angular/[email protected] wants [email protected]
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:[email protected]",
"rxjs": "npm:[email protected]",
"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/[email protected]": {
"meta": {
"src/*.js": {
"deps": [
"reflect-metadata",
"zone.js"
]
}
}
},
"npm:@angular/[email protected]": {
"meta": {
"src/*.js": {
"deps": [
"reflect-metadata",
"zone.js"
]
}
}
},
"npm:@angular/[email protected]": {
"meta": {
"src/*.js": {
"deps": [
"reflect-metadata",
"zone.js"
]
}
}
},
"npm:@angular/[email protected]": {
"meta": {
"src/*.js": {
"deps": [
"reflect-metadata",
"zone.js"
]
}
}
},
"npm:@angular/[email protected]": {
"meta": {
"src/*.js": {
"deps": [
"reflect-metadata",
"zone.js"
]
}
}
},
"npm:@angular/[email protected]": {
"meta": {
"src/*.js": {
"deps": [
"reflect-metadata",
"zone.js"
]
}
}
},
"npm:[email protected]": {
"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:[email protected]": {
"jspmNodeConversion": false,
"format": "cjs"
},
"npm:[email protected]": {
"map": {
"crypto": "@empty"
}
},
"npm:[email protected]": {
"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"
under devDependencies
,但是它给了我:
npm ERR! peerinvalid The package rxjs does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants [email protected]
npm ERR! peerinvalid Peer @angular/[email protected] wants [email protected]
npm ERR! peerinvalid Peer @angular/[email protected] wants [email protected]
npm ERR! peerinvalid Peer @angular/[email protected] wants [email protected]
实际上,此项目中安装了Angular 2两个版本。旧(angular2
)和新(@angular
)。因此,我通过以下命令卸载了旧版本:
npm uninstall angular2
然后重试:
npm install
然后:
npm start
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句