【发布时间】:2017-06-20 06:37:38
【问题描述】:
我正在尝试从 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。我应该迁移更高版本来解决这个问题吗?
【问题讨论】: