简体   繁体   English

约曼找不到发电机

[英]Yeoman can't find generators

I have installed yeoman npm install -g yo and a controller etc. npm install -g generator-meanjs 我已经安装了yeoman npm install -g yo和控制器等。npm install -g generator-meanjs

I get this error : 我收到此错误:

You don't seem to have a generator with the name meanjs installed. 您似乎没有安装名称为meanjs的生成器。 You can see available generators with npm search yeoman-generator and then insta ll them with npm install [name]. 您可以使用npm search yeoman-generator查看可用的生成器,然后使用npm install [name]对其进行安装。 To see the 0 registered generators run yo with the --help option. 要查看0个已注册的生成器,请使用--help选项运行。

and running yo in cmd (I'm on windows) also returns 0 generators, only menu to install. 并且在cmd中运行yo(我在Windows上)还返回0个生成器,仅安装菜单。

What to do? 该怎么办?

You must to re-install your nodejs with the latest version. 您必须使用最新版本重新安装nodejs。

add environments variables to path 将环境变量添加到路径

NODE_PATH = C:\Program Files\nodejs;
npm root= C:\Users\<username>\AppData\Roaming\npm\node_modules;

and it will work . 它会工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM