在全新 ubuntu 安装中使用 NPM 安装 angular-cli 时出错
Error installing angular-cli with NPM on a fresh ubuntu install
我只是不明白如何修复这些对等依赖项。
我尝试使用 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 正在处理此类版本差异..这是怎么回事?
我尝试了我在网上找到的方法:清除缓存、使用 --force 安装,但没有任何改变。我觉得我在这里缺少一些基本的东西。
我在使用 npm 安装 angular-cli 时遇到了同样的错误。
但对我来说版本已更新。
1)节点 v6.6.0
2)npm v3.10.3.
然后在我按照以下步骤操作后,错误就为我解决了。
试试这个,它可能会有所帮助。
1.npm卸载-gangular-cli
2.npm 缓存清理
3.npm 安装-g node-gyp
4.npm 安装-g node-pre-gyp
5.npm 安装-g angular-cli
我只是不明白如何修复这些对等依赖项。
我尝试使用 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 正在处理此类版本差异..这是怎么回事?
我尝试了我在网上找到的方法:清除缓存、使用 --force 安装,但没有任何改变。我觉得我在这里缺少一些基本的东西。
我在使用 npm 安装 angular-cli 时遇到了同样的错误。 但对我来说版本已更新。 1)节点 v6.6.0
2)npm v3.10.3.
然后在我按照以下步骤操作后,错误就为我解决了。 试试这个,它可能会有所帮助。
1.npm卸载-gangular-cli
2.npm 缓存清理
3.npm 安装-g node-gyp
4.npm 安装-g node-pre-gyp
5.npm 安装-g angular-cli