LoginSignup
0
1

More than 5 years have passed since last update.

composer-fabricのインストールエラーへの対応「node-pre-gyp ERR! Pre-built binaries not found for grpc@1.0.0 and node@7.5.0」

Last updated at Posted at 2017-02-14

問題

composer-fabricdeのインストールをするときに下記のエラーが発生。

➜  fabric-composer git:(master) sudo lerna bootstrap                   
Password:
Lerna v2.0.0-beta.32
Bootstrapping 18 packages
Preinstalling packages
Installing external dependencies
NpmUtilities.installInDir     ("./packages/composer-connector-hlf", ["hfc@^0.6.5"])
npm WARN deprecated node-uuid@1.4.7: use uuid module instead
node-pre-gyp ERR! Tried to download: https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.0.0/node-v51-darwin-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for grpc@1.0.0 and node@7.5.0 (node-v51 ABI) (falling back to source compile with node-gyp) 
2017-02-14 18:21:09.017 xcodebuild[39061:1335224] [MT] PluginLoading: Required plug-in compatibility UUID E0A62D1F-3C18-4D74-BFE5-A4167D643966 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XcodeBoost.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2017-02-14 18:21:09.018 xcodebuild[39061:1335224] [MT] PluginLoading: Required plug-in compatibility UUID E0A62D1F-3C18-4D74-BFE5-A4167D643966 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/VVDocumenter-Xcode.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2017-02-14 18:21:09.019 xcodebuild[39061:1335224] [MT] PluginLoading: Required plug-in compatibility UUID E0A62D1F-3C18-4D74-BFE5-A4167D643966 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/HighlightSelectedString.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2017-02-14 18:21:09.020 xcodebuild[39061:1335224] [MT] PluginLoading: Required plug-in compatibility UUID E0A62D1F-3C18-4D74-BFE5-A4167D643966 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin' not present in DVTPlugInCompatibilityUUIDs
../src/node/ext/byte_buffer.cc:99:49: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
  Local<Object> fastBuffer = bufferConstructor->NewInstance(3, consArgs);

grpcのライブラリが見つからないようである

原因

どうも最新のnode(v7系全般?)だとNGらしい

https://github.com/node-inspector/node-inspector/issues/950

解決方法

nodeのバージョンを下げる

  • nvmのインストール
git clone https://github.com/creationix/nvm.git ~/.nvm 
cd ~/.nvm
git checkout `git describe --abbrev=0 --tags`
. ~/.nvm/nvm.sh
  • nvmの設定

下記を.bashrcなどに記述しておく

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
  • versionを下げる
nvm install 6.9.1
  • もう一度、ビルドコマンドを実行
sudo lerna bootstrap 

補足

本エラーはcomposer-fabricに限ったことではなく、7系のNodeを使っている状態でgrpc@1.0.0をnpm installしようとすると出てくると思われる

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1