node.js - Jhipster : cannot use jhipster-generator

标签 node.js npm jhipster

我想尝试新版本的 jhipster,但我无法生成示例项目。我有一个 jhipster 错误:

我按照 Jhipster documentation 中的建议安装了 npm、yo、bower、generator-jhipster .

generator-jhipster安装:

npm install -g generator-jhipster
/Users/myuser/npm/bin/jhipster -> /Users/myuser/npm/lib/node_modules/generator-jhipster/cli/jhipster.js
> generator-jhipster@4.6.2 install /Users/myuser/npm/lib/node_modules/generator-jhipster
> tabtab install --name jhipster --auto
  tabtab:installer Installing completion script to bashrc directory +0ms
  tabtab:installer Installing completion script to /Users/myuser/.bashrc directory +6ms
  tabtab:installer Writing to /Users/myuser/.bashrc file in append mode +1ms
  tabtab:installer Writing actual completion script to /Users/myuser/npm/lib/node_modules/generator-jhipster/node_modules/tabtab/.completions/jhipster.bash +1ms
  tabtab:installer Already installed jhipster in /Users/myuser/.bashrc +3ms
> spawn-sync@1.0.15 postinstall /Users/myuser/npm/lib/node_modules/generator-jhipster/node_modules/spawn-sync
> node postinstall
/Users/myuser/npm/lib
└─┬ generator-jhipster@4.6.2 
  ├─┬ chalk@2.0.1 
  │ ├─┬ ansi-styles@3.2.0 
  │ │ └─┬ color-convert@1.9.0 
  │ │   └── color-name@1.1.3 
  │ ├── escape-string-regexp@1.0.5 
  │ └─┬ supports-color@4.2.1 
  │   └── has-flag@2.0.0 
  ├─┬ cheerio@0.22.0 
  │ ├─┬ css-select@1.2.0 
  │ │ ├── boolbase@1.0.0 
  │ │ ├── css-what@2.1.0 
  │ │ ├── domutils@1.5.1 
  │ │ └── nth-check@1.0.1 
  │ ├─┬ dom-serializer@0.1.0 
  │ │ └── domelementtype@1.1.3 
  │ ├── entities@1.1.1 
  │ ├─┬ htmlparser2@3.9.2 
  │ │ ├── domelementtype@1.3.0 
  │ │ ├── domhandler@2.4.1 
  │ │ └─┬ readable-stream@2.3.3 
  │ │   ├── core-util-is@1.0.2 
  │ │   ├── isarray@1.0.0 
  │ │   ├── process-nextick-args@1.0.7 
  │ │   ├── string_decoder@1.0.3 
  │ │   └── util-deprecate@1.0.2 
  │ ├── lodash.assignin@4.2.0 
  │ ├── lodash.bind@4.2.1 
  │ ├── lodash.defaults@4.2.0 
  │ ├── lodash.filter@4.6.0 
  │ ├── lodash.flatten@4.4.0 
  │ ├── lodash.foreach@4.5.0 
  │ ├── lodash.map@4.6.0 
  │ ├── lodash.merge@4.6.0 
  │ ├── lodash.pick@4.4.0 
  │ ├── lodash.reduce@4.6.0 
  │ ├── lodash.reject@4.6.0 
  │ └── lodash.some@4.6.0 
  ├─┬ commander@2.10.0 
  │ └── graceful-readlink@1.0.1 
  ├── didyoumean@1.2.1 
  ├── ejs@2.5.6 
  ├─┬ glob@7.1.2 
  │ ├── fs.realpath@1.0.0 
  │ ├─┬ inflight@1.0.6 
  │ │ └── wrappy@1.0.2 
  │ ├── inherits@2.0.3 
  │ ├─┬ minimatch@3.0.4 
  │ │ └─┬ brace-expansion@1.1.8 
  │ │   ├── balanced-match@1.0.0 
  │ │   └── concat-map@0.0.1 
  │ ├── once@1.4.0 
  │ └── path-is-absolute@1.0.1 
  ├─┬ html-wiring@1.2.0 
  │ ├─┬ cheerio@0.19.0 
  │ │ ├─┬ css-select@1.0.0 
  │ │ │ ├── css-what@1.0.0 
  │ │ │ └── domutils@1.4.3 
  │ │ ├─┬ htmlparser2@3.8.3 
  │ │ │ ├── domhandler@2.3.0 
  │ │ │ ├── domutils@1.5.1 
  │ │ │ ├── entities@1.0.0 
  │ │ │ └─┬ readable-stream@1.1.14 
  │ │ │   ├── isarray@0.0.1 
  │ │ │   └── string_decoder@0.10.31 
  │ │ └── lodash@3.10.1 
  │ └─┬ detect-newline@1.0.3 
  │   └── get-stdin@4.0.1 
  ├─┬ insight@0.8.4 
  │ ├── async@1.5.2 
  │ ├─┬ chalk@1.1.3 
  │ │ ├── ansi-styles@2.2.1 
  │ │ ├── has-ansi@2.0.0 
  │ │ └── supports-color@2.0.0 
  │ ├─┬ configstore@1.4.0 
  │ │ ├── graceful-fs@4.1.11 
  │ │ ├── os-tmpdir@1.0.2 
  │ │ ├── osenv@0.1.4 
  │ │ ├── uuid@2.0.3 
  │ │ ├─┬ write-file-atomic@1.3.4 
  │ │ │ ├── imurmurhash@0.1.4 
  │ │ │ └── slide@1.1.6 
  │ │ └── xdg-basedir@2.0.0 
  │ ├─┬ inquirer@0.10.1 
  │ │ ├── ansi-escapes@1.4.0 
  │ │ ├── ansi-regex@2.1.1 
  │ │ ├─┬ chalk@1.1.3 
  │ │ │ ├── ansi-styles@2.2.1 
  │ │ │ └── supports-color@2.0.0 
  │ │ ├─┬ cli-cursor@1.0.2 
  │ │ │ └─┬ restore-cursor@1.0.1 
  │ │ │   ├── exit-hook@1.1.1 
  │ │ │   └── onetime@1.1.0 
  │ │ ├── cli-width@1.1.1 
  │ │ ├── figures@1.7.0 
  │ │ ├── lodash@3.10.1 
  │ │ ├─┬ readline2@1.0.1 
  │ │ │ ├── code-point-at@1.1.0 
  │ │ │ ├─┬ is-fullwidth-code-point@1.0.0 
  │ │ │ │ └── number-is-nan@1.0.1 
  │ │ │ └── mute-stream@0.0.5 
  │ │ ├── run-async@0.1.0 
  │ │ ├── rx-lite@3.1.2 
  │ │ ├── strip-ansi@3.0.1 
  │ │ └── through@2.3.8 
  │ ├─┬ lodash.debounce@3.1.1 
  │ │ └── lodash._getnative@3.9.1 
  │ ├── object-assign@4.1.1 
  │ ├─┬ os-name@1.0.3 
  │ │ ├── osx-release@1.1.0 
  │ │ └── win-release@1.1.1 
  │ ├─┬ request@2.81.0 
  │ │ ├── aws-sign2@0.6.0 
  │ │ ├── aws4@1.6.0 
  │ │ ├── caseless@0.12.0 
  │ │ ├─┬ combined-stream@1.0.5 
  │ │ │ └── delayed-stream@1.0.0 
  │ │ ├── extend@3.0.1 
  │ │ ├── forever-agent@0.6.1 
  │ │ ├─┬ form-data@2.1.4 
  │ │ │ └── asynckit@0.4.0 
  │ │ ├─┬ har-validator@4.2.1 
  │ │ │ ├─┬ ajv@4.11.8 
  │ │ │ │ ├── co@4.6.0 
  │ │ │ │ └─┬ json-stable-stringify@1.0.1 
  │ │ │ │   └── jsonify@0.0.0 
  │ │ │ └── har-schema@1.0.5 
  │ │ ├─┬ hawk@3.1.3 
  │ │ │ ├── boom@2.10.1 
  │ │ │ ├── cryptiles@2.0.5 
  │ │ │ ├── hoek@2.16.3 
  │ │ │ └── sntp@1.0.9 
  │ │ ├─┬ http-signature@1.1.1 
  │ │ │ ├── assert-plus@0.2.0 
  │ │ │ ├─┬ jsprim@1.4.0 
  │ │ │ │ ├── assert-plus@1.0.0 
  │ │ │ │ ├── extsprintf@1.0.2 
  │ │ │ │ ├── json-schema@0.2.3 
  │ │ │ │ └── verror@1.3.6 
  │ │ │ └─┬ sshpk@1.13.1 
  │ │ │   ├── asn1@0.2.3 
  │ │ │   ├── assert-plus@1.0.0 
  │ │ │   ├── bcrypt-pbkdf@1.0.1 
  │ │ │   ├─┬ dashdash@1.14.1 
  │ │ │   │ └── assert-plus@1.0.0 
  │ │ │   ├── ecc-jsbn@0.1.1 
  │ │ │   ├─┬ getpass@0.1.7 
  │ │ │   │ └── assert-plus@1.0.0 
  │ │ │   ├── jsbn@0.1.1 
  │ │ │   └── tweetnacl@0.14.5 
  │ │ ├── is-typedarray@1.0.0 
  │ │ ├── isstream@0.1.2 
  │ │ ├── json-stringify-safe@5.0.1 
  │ │ ├─┬ mime-types@2.1.16 
  │ │ │ └── mime-db@1.29.0 
  │ │ ├── oauth-sign@0.8.2 
  │ │ ├── performance-now@0.2.0 
  │ │ ├── qs@6.4.0 
  │ │ ├── safe-buffer@5.1.1 
  │ │ ├── stringstream@0.0.5 
  │ │ └── tunnel-agent@0.6.0 
  │ ├─┬ tough-cookie@2.3.2 
  │ │ └── punycode@1.4.1 
  │ └── uuid@3.1.0 
  ├── jhipster-core@1.3.5 
  ├─┬ js-yaml@3.9.0 
  │ ├─┬ argparse@1.0.9 
  │ │ └── sprintf-js@1.0.3 
  │ └── esprima@4.0.0 
  ├── lodash@4.17.4 
  ├─┬ meow@3.7.0 
  │ ├─┬ camelcase-keys@2.1.0 
  │ │ └── camelcase@2.1.1 
  │ ├── decamelize@1.2.0 
  │ ├─┬ loud-rejection@1.6.0 
  │ │ ├─┬ currently-unhandled@0.4.1 
  │ │ │ └── array-find-index@1.0.2 
  │ │ └── signal-exit@3.0.2 
  │ ├── map-obj@1.0.1 
  │ ├── minimist@1.2.0 
  │ ├─┬ normalize-package-data@2.4.0 
  │ │ ├── hosted-git-info@2.5.0 
  │ │ ├─┬ is-builtin-module@1.0.0 
  │ │ │ └── builtin-modules@1.1.1 
  │ │ └─┬ validate-npm-package-license@3.0.1 
  │ │   ├─┬ spdx-correct@1.0.2 
  │ │   │ └── spdx-license-ids@1.2.2 
  │ │   └── spdx-expression-parse@1.0.4 
  │ ├─┬ read-pkg-up@1.0.1 
  │ │ ├─┬ find-up@1.1.2 
  │ │ │ └── path-exists@2.1.0 
  │ │ └─┬ read-pkg@1.1.0 
  │ │   ├─┬ load-json-file@1.1.0 
  │ │   │ └─┬ parse-json@2.2.0 
  │ │   │   └─┬ error-ex@1.3.1 
  │ │   │     └── is-arrayish@0.2.1 
  │ │   └── path-type@1.1.0 
  │ ├─┬ redent@1.0.0 
  │ │ ├─┬ indent-string@2.1.0 
  │ │ │ └─┬ repeating@2.0.1 
  │ │ │   └── is-finite@1.0.2 
  │ │ └── strip-indent@1.0.1 
  │ └── trim-newlines@1.0.0 
  ├─┬ mkdirp@0.5.1 
  │ └── minimist@0.0.8 
  ├── pluralize@5.0.0 
  ├─┬ randexp@0.4.5 
  │ ├── discontinuous-range@1.0.0 
  │ └── ret@0.1.14 
  ├── semver@5.3.0 
  ├─┬ shelljs@0.7.8 
  │ ├── interpret@1.0.3 
  │ └─┬ rechoir@0.6.2 
  │   └─┬ resolve@1.4.0 
  │     └── path-parse@1.0.5 
  ├─┬ tabtab@2.2.2 
  │ ├─┬ debug@2.6.8 
  │ │ └── ms@2.0.0 
  │ ├─┬ inquirer@1.2.3 
  │ │ ├─┬ chalk@1.1.3 
  │ │ │ ├── ansi-styles@2.2.1 
  │ │ │ └── supports-color@2.0.0 
  │ │ ├── cli-width@2.1.0 
  │ │ ├─┬ external-editor@1.1.1 
  │ │ │ ├─┬ spawn-sync@1.0.15 
  │ │ │ │ ├─┬ concat-stream@1.6.0 
  │ │ │ │ │ └── typedarray@0.0.6 
  │ │ │ │ └── os-shim@0.1.3 
  │ │ │ └── tmp@0.0.29 
  │ │ ├── mute-stream@0.0.6 
  │ │ ├─┬ pinkie-promise@2.0.1 
  │ │ │ └── pinkie@2.0.4 
  │ │ ├── run-async@2.3.0 
  │ │ ├── rx@4.1.0 
  │ │ └── string-width@1.0.2 
  │ ├── lodash.difference@4.5.0 
  │ ├── lodash.uniq@4.5.0 
  │ └─┬ npmlog@2.0.4 
  │   ├── ansi@0.3.1 
  │   ├─┬ are-we-there-yet@1.1.4 
  │   │ └── delegates@1.0.0 
  │   └─┬ gauge@1.2.7 
  │     ├── has-unicode@2.0.1 
  │     ├── lodash.pad@4.5.1 
  │     ├── lodash.padend@4.6.1 
  │     └── lodash.padstart@4.6.1 
  ├─┬ yeoman-environment@2.0.0 
  │ ├─┬ chalk@1.1.3 
  │ │ ├── ansi-styles@2.2.1 
  │ │ └── supports-color@2.0.0 
  │ ├── diff@3.3.0 
  │ ├─┬ globby@6.1.0 
  │ │ ├─┬ array-union@1.0.2 
  │ │ │ └── array-uniq@1.0.3 
  │ │ └── pify@2.3.0 
  │ ├── grouped-queue@0.3.3 
  │ ├─┬ inquirer@3.2.1 
  │ │ ├── ansi-escapes@2.0.0 
  │ │ ├─┬ chalk@2.0.1 
  │ │ │ ├── ansi-styles@3.2.0 
  │ │ │ └── supports-color@4.2.1 
  │ │ ├─┬ cli-cursor@2.1.0 
  │ │ │ └─┬ restore-cursor@2.0.0 
  │ │ │   └─┬ onetime@2.0.1 
  │ │ │     └── mimic-fn@1.1.0 
  │ │ ├── cli-width@2.1.0 
  │ │ ├─┬ external-editor@2.0.4 
  │ │ │ ├── iconv-lite@0.4.18 
  │ │ │ ├── jschardet@1.5.0 
  │ │ │ └── tmp@0.0.31 
  │ │ ├── figures@2.0.0 
  │ │ ├── mute-stream@0.0.7 
  │ │ ├── run-async@2.3.0 
  │ │ ├── rx-lite@4.0.8 
  │ │ ├── rx-lite-aggregates@4.0.8 
  │ │ ├─┬ string-width@2.1.1 
  │ │ │ ├── is-fullwidth-code-point@2.0.0 
  │ │ │ └── strip-ansi@4.0.0 
  │ │ └─┬ strip-ansi@4.0.0 
  │ │   └── ansi-regex@3.0.0 
  │ ├─┬ is-scoped@1.0.0 
  │ │ └── scoped-regex@1.0.0 
  │ ├─┬ log-symbols@1.0.2 
  │ │ └─┬ chalk@1.1.3 
  │ │   ├── ansi-styles@2.2.1 
  │ │   └── supports-color@2.0.0 
  │ ├─┬ mem-fs@1.1.3 
  │ │ ├─┬ vinyl@1.2.0 
  │ │ │ ├── clone@1.0.2 
  │ │ │ ├── clone-stats@0.0.1 
  │ │ │ └── replace-ext@0.0.1 
  │ │ └─┬ vinyl-file@2.0.0 
  │ │   ├─┬ strip-bom@2.0.0 
  │ │   │ └── is-utf8@0.2.1 
  │ │   └─┬ strip-bom-stream@2.0.0 
  │ │     └── first-chunk-stream@2.0.0 
  │ ├── text-table@0.2.0 
  │ └── untildify@3.0.2 
  └─┬ yeoman-generator@1.1.1 
    ├── async@2.5.0 
    ├─┬ chalk@1.1.3 
    │ ├── ansi-styles@2.2.1 
    │ └── supports-color@2.0.0 
    ├─┬ class-extend@0.1.2 
    │ └── object-assign@2.1.1 
    ├─┬ cli-table@0.3.1 
    │ └── colors@1.0.3 
    ├─┬ cross-spawn@5.1.0 
    │ ├─┬ lru-cache@4.1.1 
    │ │ ├── pseudomap@1.0.2 
    │ │ └── yallist@2.1.2 
    │ ├─┬ shebang-command@1.2.0 
    │ │ └── shebang-regex@1.0.0 
    │ └─┬ which@1.2.14 
    │   └── isexe@2.0.0 
    ├── dargs@5.1.0 
    ├── dateformat@2.0.0 
    ├── detect-conflict@1.0.1 
    ├─┬ error@7.0.2 
    │ ├── string-template@0.2.1 
    │ └── xtend@4.0.1 
    ├─┬ find-up@2.1.0 
    │ └─┬ locate-path@2.0.0 
    │   ├─┬ p-locate@2.0.0 
    │   │ └── p-limit@1.1.0 
    │   └── path-exists@3.0.0 
    ├─┬ github-username@3.0.0 
    │ └─┬ gh-got@5.0.0 
    │   ├─┬ got@6.7.1 
    │   │ ├─┬ create-error-class@3.0.2 
    │   │ │ └── capture-stack-trace@1.0.0 
    │   │ ├── duplexer3@0.1.4 
    │   │ ├── get-stream@3.0.0 
    │   │ ├── is-redirect@1.0.0 
    │   │ ├── is-retry-allowed@1.1.0 
    │   │ ├── is-stream@1.1.0 
    │   │ ├── lowercase-keys@1.0.0 
    │   │ ├── timed-out@4.0.1 
    │   │ ├── unzip-response@2.0.1 
    │   │ └─┬ url-parse-lax@1.0.0 
    │   │   └── prepend-http@1.0.4 
    │   └── is-plain-obj@1.1.0 
    ├─┬ istextorbinary@2.1.0 
    │ ├── binaryextensions@2.0.0 
    │ ├── editions@1.3.3 
    │ └── textextensions@2.1.0 
    ├─┬ mem-fs-editor@3.0.2 
    │ ├── commondir@1.0.1 
    │ ├── deep-extend@0.4.2 
    │ ├─┬ multimatch@2.1.0 
    │ │ ├── array-differ@1.0.0 
    │ │ └── arrify@1.0.1 
    │ └─┬ vinyl@2.1.0 
    │   ├── clone@2.1.1 
    │   ├── clone-buffer@1.0.0 
    │   ├── clone-stats@1.0.0 
    │   ├── cloneable-readable@1.0.0 
    │   ├── remove-trailing-separator@1.0.2 
    │   └── replace-ext@1.0.0 
    ├── path-exists@3.0.0 
    ├── pretty-bytes@4.0.2 
    ├── read-chunk@2.0.0 
    ├─┬ read-pkg-up@2.0.0 
    │ └─┬ read-pkg@2.0.0 
    │   ├─┬ load-json-file@2.0.0 
    │   │ └── strip-bom@3.0.0 
    │   └── path-type@2.0.0 
    ├── rimraf@2.6.1 
    ├─┬ run-async@2.3.0 
    │ └── is-promise@2.1.0 
    ├── through2@2.0.3 
    ├─┬ user-home@2.0.0 
    │ └── os-homedir@1.0.2 
    └─┬ yeoman-environment@1.6.6 
      ├── diff@2.2.3 
      ├─┬ globby@4.1.0 
      │ └── glob@6.0.4 
      ├─┬ inquirer@1.2.3 
      │ ├── cli-width@2.1.0 
      │ └── mute-stream@0.0.6 
      └── untildify@2.1.0* 

--

hubtalents-jhipster myuser$ yo jhipster
Error jhipster 

You don't seem to have a generator with the name jhipster installed.
You can see available generators with npm search yeoman-generator and then install them with npm install [name].
To see the 1 registered generators run yo with the `--help` option.

我不明白发生了什么。生成器安装没有错误,但是你找不到。我的配置或安装有错误吗? 谢谢

最佳答案

使用新版本的 JHipster,只运行命令 'jhipster'

jhipster

而不是'yo jhipster'

关于node.js - Jhipster : cannot use jhipster-generator,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45395429/

相关文章:

javascript - 避免 Node 中的回调 hell

node.js - 何时将 React 与 npm 结合使用?

angular - 通过 Homebrew 安装 Angular CLI(或任何节点包)与 NPM 全局安装之间的区别

docker - 容器中的jhipster网关无法强制运行在localhost中的微服务

node.js - 通过 CRON 在设定的时间运行 Node JS 应用程序,还是本质上利用 CRON 运行 24/7 Node 应用程序,哪个效率更高?

Node.js + Joi 如何显示自定义错误消息?

javascript - 如何找出可以从 npm 包中导出的内容

javascript - json 输入 react 意外结束

java - Post请求中传递文件和Json数据

java - JHipster 应用程序中的 Redis 集成