node.js - 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 软件?
先感谢您!
解决方案
目前使用 Travis CI 运行的 Composer 构建 - 在这里查看更多信息https://hyperledger.github.io/composer/latest/business-network/testing和更多信息在这里https://github.com/hyperledger/composer/wiki/Builds incl链接。您的测试错误可能是因为您遇到了类似的情况?要求没有定义?节点.js
推荐阅读
- javascript - 我有一组对象,如果其中一个键匹配(不覆盖初始属性),我想将它们组合成一个对象
- sql - 如何通过oracle中的游标更新另一个表列中不同行的表列
- php - 尝试将 xampp 数据库表连接到 php:错误未定义变量:mysqli_query 和致命错误
- node.js - 通过 Node.js 从 API 请求信息
- python - 如何使用包含占位符的“subprocess.check_call”运行“ls”命令?
- ios - 删除自定义数组中元素的安全优雅的方式,Swift
- mongodb - 如何更改嵌入类型的属性名称?
- scala - 如何通过改变随机值获得加特林模拟
- python - 在 pandas 数据框列中仅保留重复四次以上的行
- c# - 为什么我不能从反序列化的 Newtonsoft json 访问这个动态属性