我只是不明白如何解决这些对等的依赖。
我尝试在全局安装NPM的angular度cli,但总是导致:
npm ERR! Linux 3.19.0-25-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "-f" "angular-cli" npm ERR! node v4.6.0 npm ERR! npm v2.15.9 npm ERR! code EPEERINVALID npm ERR! peerinvalid The package @angular/compiler@2.1.0 does not satisfy its siblings' peerDependencies requirements! npm ERR! peerinvalid Peer @angular/compiler-cli@0.6.4 wants @angular/compiler@2.0.2 npm ERR! peerinvalid Peer @angular/platform-server@2.1.0 wants @angular/compiler@2.1.0
我在想NPM正在照顾这样的版本差异..发生了什么事情?
我尝试了我在网上find的:清除caching,使用–force进行安装,但没有任何更改。 我觉得我在这里错过了一些基本的东西。
当我用npm安装angular-cli时,我得到了同样的错误。 但是对我来说版本已经更新了。 1)节点v6.6.0
2)npm v3.10.3。
然后,我按照以下步骤后,我的错误被解决了。 试试这个,这可能有帮助。
1.npm uninstall -g angular-cli
2.npm缓存清理
3.npm install -g node-gyp
4.npm install -g node-pre-gyp
5.npm install -g angular-cli