2017-08-02 2 views
0

Je suis impatient d'exécuter l'exemple fabcar de Hyperledger-fabric où j'ai créé quelques voitures. Lorsque je tente d'exécuterImpossible d'exécuter la démo de fabcar dans Hyperledger

node query.js 

à ../fabric-samples/fabcar Je reçois une erreur

fabric-client not found 

Si j'exécuter

npm install 

je noeud 6.9.0 et npm 3.10.0
Je reçois une erreur comme celle-ci

> [email protected] install /home/.../fabric-samples/fabcar/node_modules/grpc 
> node-pre-gyp install --fallback-to-build 

node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.2.4/node-v57-linux-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v57 ABI) (falling back to source compile with node-gyp) 
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/8.0.0" 
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/.../fabric-samples/fabcar/node_modules/grpc/.node-gyp" 
make: Entering directory '/home/.../fabric-samples/fabcar/node_modules/grpc/build' 
make: *** No rule to make target '../.node-gyp/8.0.0/include/node/common.gypi', needed by 'Makefile'. Stop. 
make: Leaving directory '/home/.../fabric-samples/fabcar/node_modules/grpc/build' 
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2 
gyp ERR! stack  at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23) 
gyp ERR! stack  at emitTwo (events.js:125:13) 
gyp ERR! stack  at ChildProcess.emit (events.js:213:7) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12) 
gyp ERR! System Linux 4.4.0-42-generic 
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/.../fabric-samples/fabcar/node_modules/grpc/src/node/extension_binary/grpc_node.node" "--module_name=grpc_node" "--module_path=/home/.../fabric-samples/fabcar/node_modules/grpc/src /node/extension_binary" 
gyp ERR! cwd /home/.../fabric-samples/fabcar/node_modules/grpc 
gyp ERR! node -v v8.0.0 
gyp ERR! node-gyp -v v3.3.1 
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/.../fabric-samples/fabcar/node_modules/grpc/src/node/extension_binary/grpc_node.node 
--module_name=grpc_node --module_path=/home/.../fabric-samples/fabcar/node_modules/grpc/src/node/extension_binary' (1) 
node-pre-gyp ERR! stack  at ChildProcess.<anonymous> (/home/.../fabric-samples/fabcar/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29) 
node-pre-gyp ERR! stack  at emitTwo (events.js:125:13) 
node-pre-gyp ERR! stack  at ChildProcess.emit (events.js:213:7) 
node-pre-gyp ERR! stack  at maybeClose (internal/child_process.js:887:16) 
node-pre-gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5) 
node-pre-gyp ERR! System Linux 4.4.0-42-generic 
node-pre-gyp ERR! command "/usr/local/bin/node" "/home/.../fabric-samples/fabcar/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" 
node-pre-gyp ERR! cwd /home/.../fabric-samples/fabcar/node_modules/grpc 
node-pre-gyp ERR! node -v v8.0.0 
node-pre-gyp ERR! node-pre-gyp -v v0.6.34 
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules /npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/.../fabric-samples/fabcar/node_modules/grpc/src/node/extension_binary/grpc_node.node --module_name=grpc_node --module_path=/home/.../fabric-samples/fabcar/node_modules/grpc/src /node/extension_binary' (1) 
[email protected] /home/.../fabric-samples/fabcar`-- (empty) 

npm WARN [email protected] No repository field. 
npm ERR! Linux 4.4.0-42-generic 
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" 
npm ERR! node v8.0.0 
npm ERR! npm v3.10.3 
npm ERR! code ELIFECYCLE 

npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build'. 
npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, this is most likely a problem with the grpc package 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node-pre-gyp install --fallback-to-build 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs grpc 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls grpc 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  /home/.../fabric-samples/fabcar/npm-debug.log 
npm ERR! code 1 

quelqu'un peut me aider à exécuter le code

+0

vous exécutez Windows? Si tel est le cas, veuillez consulter cette rubrique SO https://stackoverflow.com/questions/45232825/error-cannot-find-module-fabric-client. Si non, puis-je demander quelle version de Python est installée? – christo4ferris

+0

Votre connexion à Internet était-elle en place à ce moment-là? Les premières lignes de l'erreur collée ci-dessus semblent indiquer un problème de téléchargement. Vous pouvez essayer d'installer node-gyp manuellement - npm install -g node-gyp et assurez-vous d'avoir les prérequis - https://github.com/nodejs/node-gyp –

Répondre

1

Il a été résolu après la suppression node_module répertoire et puis en faisant NPM installer