繁体   English   中英

我无法安装 generator-jhipster-uml 来生成实体

[英]I can not install generator-jhipster-uml to generate entities

我正在尝试从https://jhipster.github.io/jdl-studio/生成实体(Java 类),我创建了jhipster-jdl.jh文件并开始生成实体。 首先根据我使用的文档

yo jhipster:import-jdl my_file.jdl

生成我的实体,但此语句生成一些.json文件,仅此而已,但我需要 java 类、DTO、服务和其他文件。 我的朋友告诉使用这个:

yo jhipster-uml my_file.jdl

但在那之后我收到了这个错误:

Error jhipster-uml .\jhipster-jdl.jh

You don’t seem to have a generator with the name “jhipster-uml” installed.
But help is on the way:

You can see available generators via npm search yeoman-generator or via http://yeoman.io/gene
Install them with npm install generator-jhipster-uml.

To see all your installed generators run yo without any arguments. 

然后我尝试安装此生成器,但出现其他错误:

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\M\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\
npm-cli.js" "install" "generator-jhipster-uml"
npm ERR! node v6.9.4
npm ERR! npm  v4.1.2
npm ERR! code E404

npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/generator-jhipster-uml
npm ERR! 404
npm ERR! 404  'generator-jhipster-uml' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

我该怎么办? 我做了文档中描述的一切。 我使用的是 Jhipster 版本 3 而不是 4。我应该迁移高版本来解决这个问题吗?

yo jhipster:import-jdl my_file.jdl应该导入您的 JDL 并为实体生成 JSON 文件和前端/后端文件。 如果失败,请打开一个问题。

jhipster-uml不是jhipster-uml生成器,因此您可以在没有yo之前运行它。 这也是安装generator-jhipster-uml失败的原因。 要安装,请按照文档中的说明进行操作

 npm install -g jhipster-uml

如果您还没有开始项目,我建议您升级到 v4。 如果需要,您现在仍然可以使用 Angular 1。

暂无
暂无

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

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