当我跑步时
yo meanjs
我收到以下错误。
Error meanjs
You don't seem to have a generator with the name meanjs installed.
You can see available generators with npm search yeoman-generator and then install them with npm install [name].
To see the 0 registered generators run yo with the `--help` option.
然而,当我跑...
npm search yeoman-generator
我明白了......
generator-meanis A Meanis Generator for Yeoman
generator-meanjs MEAN.JS Official Yeoman Generator
generator-meanjs-table MEAN.JS Table Yeoman Generator
所以我安装了meanjs发电机,但它不起作用。我该如何解决?
答案 0 :(得分:1)
通常的调试步骤,无论何时找不到发电机都要运行:
yo doctor
这将通过您的计算机查看,并确保所有内容都配置正确。
唯一没有正确检测的情况是,有时人们安装了多个版本的npm,这会混淆节点生态系统。
回顾:
yo doctor
如果这不起作用,请在yeoman/yo上打开一个问题,以便我们可以向yo doctor
命令添加更多检查。
答案 1 :(得分:0)
Per the docs,您需要同时安装yo
和生成器:
$ npm install -g yo
$ npm install -g generator-meanjs
然后你可以这样做:
$ yo meanjs