【问题标题】:Unable to install Elasticsearch Reindexer 1.0.1 on JHipster 4.8.2无法在 JHipster 4.8.2 上安装 Elasticsearch Reindexer 1.0.1
【发布时间】:2018-03-22 15:23:39
【问题描述】:

这是我与 JHipster 的第一个项目。我想安装 Elasticsearch Reindexer 模块。我按照市场上提供的说明进行操作,但在安装时出现以下错误:

`C:\Project>哟 jhipster-elasticsearch-reindexer C:\Project\node_modules\generator-jhipster-elasticsearch-reindexer\generators\app\index.js:27 JhipsterGenerator = generator.Base.extend({}); ^

TypeError:无法读取未定义的属性“扩展” 在对象。 (C:\Project\node_modules\generator-jhipster-elasticsearch-reindexer\generators\app\index.js:27:37) 在 Module._compile (module.js:570:32) 在 Object.Module._extensions..js (module.js:579:10) 在 Module.load (module.js:487:32) 在 tryModuleLoad (module.js:446:12) 在 Function.Module._load (module.js:438:3) 在 Module.require (module.js:497:17) 在需要(内部/module.js:20:19) 在 Object.get [as jhipster-elasticsearch-reindexer:app] (C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\yo\node_modules\yeoman-environment\lib\store.js:38:27) 在 Store.get (C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\yo\node_modules\yeoman-environment\lib\store.js:61:39)`

我能够安装实体审计 - 这工作正常。

任何建议/建议请...

【问题讨论】:

    标签: jhipster


    【解决方案1】:

    今天也遇到了同样的问题,并在项目页面中创建了一个问题。 https://github.com/geraldhumphries/generator-jhipster-elasticsearch-reindexer/issues/34

    对 node_modules 和 npm 包不是很熟悉,但为了使其正常工作,实际上将 yeoman-generator 的版本降级到了较低的 1.1.1 版本,这就是我所做的:

    ** 请注意,这只是我申请的一个快速修复程序,以便能够重新索引我的应用程序 :-) 所以请返回项目中查看更新版本。

    1. 转到 npm 中所有软件包的安装位置,在 windows 中应位于: C:\Users\yourusername\AppData\Roaming\npm\node_modules\

    2. 转到 generator-jhipster-elasticsearch-reindexer\ 并打开 package.json 文件

    3. 找到“约曼发电机” 并将此处的版本更改为 1.1.1,如下所示:“yeoman-generator”:“1.1.1”
    4. 打开命令行,进入 C:\Users\yourusername\AppData\Roaming\npm\node_modules\generator-jhipster-elasticsearch-reindexer\ 并执行以下命令: npm 安装
    5. 在您的项目目录中重新运行 yo jhipster-elasticsearch-reindexer 命令

    祝你好运!

    【讨论】:

    • 看来问题已经解决了。在 git 中测试了新版本,它正在使用最新的 yeoman-generator。我们需要等待此修复程序的发布:-)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-07-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多