【问题标题】:Unable to install composer rest server无法安装作曲家休息服务器
【发布时间】:2019-05-10 06:02:35
【问题描述】:

我正在尝试在我的 macOS 中安装 composer rest 服务器,但我遇到了错误。如何解决这些错误并安装 composer rest 服务器?

我正在阅读 this 文章并学习如何实现 Composer 区块链网络。 当我跑步时

npm install -g composer-rest-server

我收到以下错误

AttributeError: 'NoneType' object has no attribute 'groups'
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/pc/.nvm/versions/node/v9.4.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack     at ChildProcess.emit (events.js:160:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/Users/pc/.nvm/versions/node/v9.4.0/bin/node" "/Users/pc/.nvm/versions/node/v9.4.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/pc/.nvm/versions/node/v9.4.0/lib/node_modules/composer-rest-server/node_modules/pkcs11js
gyp ERR! node -v v9.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pkcs11js@1.0.17 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the pkcs11js@1.0.17 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/pc/.npm/_logs/2019-05-10T06_00_02_075Z-debug.log

我的节点版本 9.4.0 npm 版本 5.6.0

是否必须安装 xcode 才能运行此代码?请说说xcode运行composer的意义

【问题讨论】:

    标签: node.js blockchain hyperledger-composer


    【解决方案1】:

    出现此问题是因为hyperledger composer tools 不支持node v9.x.x

    所以,你必须使用 node v8.x.x

    步骤:Link

    同时安装Xcode Command Line Tools

    步骤:Link

    【讨论】:

    • 必须安装 xcode 才能运行 composer 吗?或者你能在你的回答中告诉你xcode在安装作曲家的意义是什么?
    • 我也想知道如何在最新的节点版本中安装作曲家。
    • 不需要安装完整的xcode,它只需要cli工具来构建composer工具。对于windows,您需要安装windows-build-tools,对于ubuntu,您需要安装build-essential
    猜你喜欢
    • 1970-01-01
    • 2022-11-10
    • 2017-08-13
    • 2014-10-12
    • 1970-01-01
    • 1970-01-01
    • 2018-12-12
    • 2019-02-01
    • 2023-03-03
    相关资源
    最近更新 更多