我正在跟踪this page,使用提供的示例脚本在超级分层结构上创建一个简单的应用程序。
网络已成功构建,但在查询分类帐时, query.js 无法获取并使用依赖关系fabric-client。
我估计可能是我安装的节点版本(8.1.2)与此软件包所需的节点版本之间存在差异,但如果没有最新的节点版本,此脚本的其他部分也将失败。以下是运行脚本的错误日志:
#
# Fatal error in ../deps/v8/src/api.cc, line 1200
# Check failed: !value_obj->IsJSReceiver() || value_obj->IsTemplateInfo().
#
==== C stack trace ===============================
0 node 0x00000001008ae9e9 v8::base::debug::StackTrace::StackTrace() + 19
1 node 0x00000001008ad74d V8_Fatal + 213
2 node 0x000000010014240e v8::Template::SetPrivate(v8::Local<v8::Private>, v8::Local<v8::Data>, v8::PropertyAttribute) + 0
3 grpc_node.node 0x0000000106001dc7 grpc::node::Call::Init(v8::Local<v8::Object>) + 277
4 grpc_node.node 0x000000010600bb07 init(v8::Local<v8::Object>) + 132
5 node 0x00000001007fa51b node::DLOpen(v8::FunctionCallbackInfo<v8::Value> const&) + 864
6 node 0x0000000100168dee v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) + 416
7 node 0x00000001001b5d8c v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) + 871
8 node 0x00000001001b53a2 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) + 276
9 ??? 0x00002c528d90437d 0x0 + 48733073982333
10 ??? 0x00002c528dbadfb4 0x0 + 48733076774836
Illegal instruction: 4
回滚到节点v7.10.0时,会出现另一个错误:
module.js:598
return process.dlopen(module, path._makeLong(filename));
^
Error: The module '/Users/slee/dev/go/src/fabric-samples/fabcar/node_modules/grpc/src/node/extension_binary/grpc_node.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 57. This version of Node.js requires
NODE_MODULE_VERSION 51. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or`npm install`).
at Object.Module._extensions..node (module.js:598:18)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/slee/dev/go/src/fabric-samples/fabcar/node_modules/grpc/src/node/src/grpc_extension.js:38:15)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
有人知道这个问题吗?