简体   繁体   中英

Fatal error in hyperledger-fabric tutorial; potential incompatibility problems

I was following through this page to create a simple application on hyperledger fabric, using the sample scripts provided.

Network is successfully built, but when it comes to the part of querying the ledger, query.js is not able to fetch and use the dependency fabric-client.

I estimated that it may be a discrepancy between the node version I have installed (8.1.2) and the node version required by this package, but without the latest node version other parts of this script would also fail. Below is the error log from running the script:

#
# 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

When rolling back to node v7.10.0, a different error emerges:

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)

Would anyone know the problem?

I have tested it work successfully.

Please check the Prerequisites .

Confirm node version ( version 6.9.x or greater version 7.x is not supported at this time. ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM