【发布时间】:2019-01-15 09:14:02
【问题描述】:
您好,我正在尝试使用 HyperLedgerFabric 设置第一个应用程序
我正在关注这个post,我已经正确设置了网络,一切似乎都很完美,当我尝试使用npm install 或sudo npm install 命令安装npm 时,问题只出在npm install 上
它显示以下错误。
build error
stack Error: `make` failed with exit code: 2
stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
stack at emitTwo (events.js:126:13)
stack at ChildProcess.emit (events.js:214:7)
stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
System Linux 4.8.0-53-generic
command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
cwd /home/dinesh/Documents/fabric-samples/fabcar/node_modules/pkcs11js
node -v v8.11.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN fabcar@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
errno 1
npm ERR! pkcs11js@1.0.17 install: `node-gyp rebuild`
Exit status 1
Failed at the pkcs11js@1.0.17 install script.
谁能帮我解决这个问题?
提前致谢
gyp 错误!堆栈错误:EACCES:权限被拒绝,mkdir '/var/www/html/fabric-samples/fabcar/javascript/node_modules/pkcs11js/build'
【问题讨论】:
-
您可以在您发布的错误消息中添加更多内容吗?我认为我们可能会在您发布的内容之上遗漏一些内容? FWIW,我刚刚尝试在 Ubuntu 16.04 上使用 Node 8.11.3 执行此操作,没有任何问题
-
@GariSingh 感谢您的回复,我有节点 8.11.0 和 mint 18.2,但是在尝试安装 npm 时显示错误,我添加了有问题的主要错误
-
我的猜测是您以某种方式以 root 身份运行或使用 sudo 运行命令。虽然我不确定
/var/www/html的默认权限是什么,但您通常不需要是 root 或使用 sudo。我建议将 fabric-samples 克隆到您当前用户 ID 拥有的目录中,并以该用户身份再次运行npm install
标签: hyperledger-fabric hyperledger npm-install node-gyp