无法在离子

时间:2017-10-10 12:31:46

标签: javascript ionic-framework hyperledger-composer

我使用hyberledger-composer-common npm模块和ionic的组合遇到了问题。基本设置按预期工作,但当我尝试连接到hyperledger网络时,它会引发以下错误:

Error: Failed to load connector module "composer-connector-hlfv1" for connection profile "Default". curmod.require is not a function-connectionManagerLoader.require is not a function-connectionManagerLoader.require is not a function-Cannot find module "."
    at connectionProfileStore.load.then (connectionprofilemanager.js:160)
    at t.invoke (polyfills.js:3)
    at Object.onInvoke (core.es5.js:3890)
    at t.invoke (polyfills.js:3)
    at r.run (polyfills.js:3)
    at polyfills.js:3
    at t.invokeTask (polyfills.js:3)
    at Object.onInvokeTask (core.es5.js:3881)
    at t.invokeTask (polyfills.js:3)
    at r.runTask (polyfills.js:3)

我很擅长使用ionicjavascript构建器,所以我不知道在哪里看。我猜它与polyfillsionic处理路径的方式有关,但我不确定。任何人都可以给我一个正确的方向吗?

在尝试实例化loggerclass时,应用程序也会抛出类似的错误:

Failed to load logger module ./winstonInjector.js: Cannot find module "."

实施如下:

//example
var loggerToUse = './winstonInjector.js';
myLogger = require(loggerToUse);

这让我想到了关于动态加载模块的问题:)

0 个答案:

没有答案