首页 > 解决方案 > CI Hyperledger Composer 与 Jenkins

问题描述

我正在尝试使用 Jenkins 在我的项目中实施 CI,但在 Hyperledger Composer 模块中出现错误,我不知道如何解决。我的单元测试是使用 Mocha 和 Chai 编写的。

错误:

ReferenceError: require is not defined
at _generator (eval at <anonymous> (eval at compile (node_modules/composer-runtime/lib/scriptcompiler.js:99:33)), <anonymous>:18:23)
at CompiledScriptBundle.execute (node_modules/composer-runtime/lib/compiledscriptbundle.js:53:29)
at Engine._executeTransaction (node_modules/composer-runtime/lib/engine.transactions.js:125:84)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)

有谁知道如何解决这个问题?或者,有没有人推荐另一个更好地测试我们的超级账本作曲家代码的 CI 软件?

先感谢您!

标签: node.jsjenkinsmocha.jschaihyperledger-composer

解决方案


目前使用 Travis CI 运行的 Composer 构建 - 在这里查看更多信息https://hyperledger.github.io/composer/latest/business-network/testing和更多信息在这里https://github.com/hyperledger/composer/wiki/Builds incl链接。您的测试错误可能是因为您遇到了类似的情况?要求没有定义?节点.js


推荐阅读