1

我正在尝试按照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.

它说我需要安装版本> 1.0.0,但我已经安装了

yo --version
1.6.0

关于我做错了什么的任何想法或解决此问题的任何线索?

4

1 回答 1

0

我有同样的问题......原因似乎是在更高版本的 npm 中对等依赖项的安装发生了变化。作为一种解决方法,yo在安装时包括generator-mean-seed(它已经安装没关系):

$ sudo npm install -g yo 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
于 2016-02-28T20:15:37.433 回答