[英]Cannot find module ; Hyperledger Fabric Tutorial
I am trying to run a hyperledger tutorial app (fabcar).我正在尝试运行一个超级账本教程应用程序 (fabcar)。
I have followed the install and try to run node query.js
.我已经按照安装并尝试运行
node query.js
。
I get this error on terminal:我在终端上收到此错误:
module.js:529
throw err;
^
Error: Cannot find module '/Users/pro/Documents/Code/HyperLegderFabric/fabric-samples/fabcar/node_modules/grpc/src/node/extension_binary/node-v57-darwin-x64/grpc_node.node'
at Function.Module._resolveFilename (module.js:527:15)
at Function.Module._load (module.js:476:23)
at Module.require (module.js:568:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/pro/Documents/Code/HyperLegderFabric/fabric-samples/fabcar/node_modules/grpc/src/node/src/grpc_extension.js:30:15)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
I will appreciate pointers in debugging this我会很感激调试这个的指针
Issue was I was running on python 3.6 .问题是我在 python 3.6 上运行。
I have intially used:我最初使用过:
npm config set python python2.7
npm install --python=/usr/bin/python
and even乃至
sudo npm install --unsafe-perm -g --python=python2.7
but the problem was I this just assumed
python 2.7 was on my pc, allowed me to install it.但问题是我只是
assumed
python 2.7 在我的电脑上,允许我安装它。
When I ran the node query.js
command, grpc_node.node
was still a dependency that wasnt resolved.当我运行
node query.js
命令时, grpc_node.node
仍然是一个未解决的依赖项。
To solve this, I had to为了解决这个问题,我不得不
conda create --name py2_env numpy python=2.7
(I use the anaconda distro))conda create --name py2_env numpy python=2.7
(我使用的是 anaconda 发行版))npm install
npm install
Works fine now现在工作正常
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.