安装generator-mean-seed时出错

时间:2016-01-11 04:11:56

标签: node.js npm yeoman-generator yeoman-generator-angular yo

我正在尝试按照https://www.npmjs.com/package/generator-mean-seed

上的说明进行操作

当我尝试运行“sudo npm install -g generator-mean-seed”时出现此错误

npm install -g generator-mean-seed
npm WARN deprecated lodash@1.3.1: lodash@<2.0.0 is no longer maintained. Upgrade to lodash@^3.0.0
npm WARN deprecated CSSselect@0.7.0: the module is now available as 'css-select'
npm WARN deprecated CSSwhat@0.4.7: the module is now available as 'css-what'
npm WARN deprecated lodash@1.2.1: lodash@<2.0.0 is no longer maintained. Upgrade to lodash@^3.0.0
/usr/local/lib
├── generator-mean-seed@1.1.26 
└── UNMET PEER DEPENDENCY yo@>=1.0.0

npm WARN generator-mean-seed@1.1.26 requires a peer of yo@>=1.0.0 but none was installed.

它说我需要安装版本&gt; 1.0.0但我已经安装了

yo --version
1.6.0

对于我做错了什么或任何解决这个问题的线索有什么想法?

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题......原因似乎是在npm的更高版本中对等依赖项的安装发生了变化。要解决此问题,请在安装yo时添加generator-mean-seed(它已经安装并不重要):

$ sudo npm install -g yo generator-mean-seed

这样,generator-mean-seed将正确安装:

$ sudo npm install -g yo generator-mean-seed
npm WARN deprecated lodash@1.3.1: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated CSSselect@0.7.0: the module is now available as 'css-select'
npm WARN deprecated CSSwhat@0.4.7: the module is now available as 'css-what'
npm WARN deprecated lodash@1.2.1: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated graceful-fs@3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
/usr/local/bin/yo -> /usr/local/lib/node_modules/yo/lib/cli.js

> yo@1.7.0 postinstall /usr/local/lib/node_modules/yo
> yodoctor