2017-09-17 59 views
0

失败当我运行使用提供了以下指令织物样品中的第一织物应用通过<a href="https://hyperledger-fabric.readthedocs.io/en/latest/write_first_app.html" rel="nofollow noreferrer">official Fabric document</a>运行第一织物应用

npm install 

它表明:

npm WARN deprecated [email protected]: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in. 
npm WARN deprecated [email protected]: Use uuid module instead 

> [email protected] install /home/ubuntu/go/src/github.com/hyperledger/fabric-samples/fabcar/node_modules/pkcs11js 
> npm run build 


> [email protected] build /home/ubuntu/go/src/github.com/hyperledger/fabric-samples/fabcar/node_modules/pkcs11js 
> node-gyp configure build 

make: Entering directory '/home/ubuntu/go/src/github.com/hyperledger/fabric-samples/fabcar/node_modules/pkcs11js/build' 
    CXX(target) Release/obj.target/pkcs11/src/main.o 
    CXX(target) Release/obj.target/pkcs11/src/dl.o 
    CXX(target) Release/obj.target/pkcs11/src/const.o 
    CXX(target) Release/obj.target/pkcs11/src/pkcs11/error.o 
    CXX(target) Release/obj.target/pkcs11/src/pkcs11/v8_convert.o 
    CXX(target) Release/obj.target/pkcs11/src/pkcs11/template.o 
    CXX(target) Release/obj.target/pkcs11/src/pkcs11/mech.o 
../src/pkcs11/mech.cpp: In member function ‘void Mechanism::Free()’: 
../src/pkcs11/mech.cpp:121:15: warning: deleting ‘void*’ is undefined [-Wdelete-incomplete] 
    delete(param); 
      ^
    CXX(target) Release/obj.target/pkcs11/src/pkcs11/param.o 
    CXX(target) Release/obj.target/pkcs11/src/pkcs11/param_aes.o 
    CXX(target) Release/obj.target/pkcs11/src/pkcs11/param_rsa.o 
    CXX(target) Release/obj.target/pkcs11/src/pkcs11/param_ecdh.o 
    CXX(target) Release/obj.target/pkcs11/src/pkcs11/pkcs11.o 
    CXX(target) Release/obj.target/pkcs11/src/async.o 
    CXX(target) Release/obj.target/pkcs11/src/node.o 
    SOLINK_MODULE(target) Release/obj.target/pkcs11.node 
    COPY Release/pkcs11.node 
make: Leaving directory '/home/ubuntu/go/src/github.com/hyperledger/fabric-samples/fabcar/node_modules/pkcs11js/build' 

> [email protected] install /home/ubuntu/go/src/github.com/hyperledger/fabric-samples/fabcar/node_modules/grpc 
> node-pre-gyp install --fallback-to-build --library=static_library 

[grpc] Success: "/home/ubuntu/go/src/github.com/hyperledger/fabric-samples/fabcar/node_modules/grpc/src/node/extension_binary/node-v46-linux-x64/grpc_node.node" is installed via remote 
(omitting ) 
npm WARN [email protected] No repository field. 

然后我运行命令:node query.js ,发生错误。

module.js:471 
    throw err; 
    ^

Error: Cannot find module '/home/ubuntu/go/src/github.com/hyperledger/fabric-samples/fabcar/node_modules/grpc/src/node/extension_binary/node-v48-linux-x64/grpc_node.node' 
    at Function.Module._resolveFilename (module.js:469:15) 
    at Function.Module._load (module.js:417:25) 
    at Module.require (module.js:497:17) 
    at require (internal/module.js:20:19) 
    at Object.<anonymous> (/home/ubuntu/go/src/github.com/hyperledger/fabric-samples/fabcar/node_modules/grpc/src/node/src/grpc_extension.js:30:15) 
    at Module._compile (module.js:570:32) 
    at Object.Module._extensions..js (module.js:579:10) 
    at Module.load (module.js:487:32) 
    at tryModuleLoad (module.js:446:12) 
    at Function.Module._load (module.js:438:3) 

我通过VMware软件节点v6.9.5和NPM v3.10.10上面那样在Ubuntu 16.04。 请帮忙,thx。

回答

0

可以运行

npm install grpc --save 

安装GRPC模块,避免犯错。