2017-05-10 18 views
1

他のノードパッケージのバイナリビルドへのフォールバックに関しては他の問題が見つかりましたが、レルムはありません。プロジェクトのルートとnode-gypからnode_modulesを削除して、新鮮なnpm installnpm経由でレルムをインストールする際にエラーが発生しました:npm ERR! [email protected]インストールスクリプトで失敗しました 'node-pre-gyp install --fallback-to-build'

をやって、libkrb5-devをインストール/ build-essentialをインストールし、/home/.node-gypを取り除く

:私のような他のシナリオからいくつかの解決策を試してみましたしかし、npm install --save realmを実行すると、このエラートレースが表示されます。

node-pre-gyp ERR! Tried to download(404): https://static.realm.io/node-pre-gyp/realm-v1.2.0-node-v51-linux-ia32.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v51 ABI) (falling back to source compile with node-gyp) 
make: Entering directory `/home/..../node_modules/realm/build' 
    ACTION binding_gyp_vendored_realm_target_download_realm /home/..../node_modules/realm/vendor/realm-node 
Downloading dependency: realm-node 2.4.0 
Using cached realm-node from TMPDIR 
Skipping the sync download because ENABLE_SYNC is false. 
    TOUCH Release/obj.target/vendored-realm.stamp 
    TOUCH Release/obj.target/realm-core.stamp 
    CXX(target) Release/obj.target/object-store/src/object-store/src/binding_callback_thread_observer.o 
g++: error: unrecognized command line option ‘-std=c++14’ 
make: *** [Release/obj.target/object-store/src/object-store/src/binding_callback_thread_observer.o] Error 1 
make: Leaving directory `/home/..../node_modules/realm/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:285:23) 
gyp ERR! stack  at emitTwo (events.js:106:13) 
gyp ERR! stack  at ChildProcess.emit (events.js:192:7) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) 
gyp ERR! System Linux 4.4.0-75-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/./node_modules/realm/compiled/node-v51_linux_ia32/realm.node" "--module_name=realm" "--module_path=/home/..../node_modules/realm/compiled/node-v51_linux_ia32" 
gyp ERR! cwd /home/..../node_modules/realm 
gyp ERR! node -v v7.5.0 
gyp ERR! node-gyp -v v3.6.0 
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/..../node_modules/realm/compiled/node-v51_linux_ia32/realm.node --module_name=realm --module_path=/home/..../node_modules/realm/compiled/node-v51_linux_ia32' (1) 
node-pre-gyp ERR! stack  at ChildProcess.<anonymous> (/home/..../node_modules/node-pre-gyp/lib/util/compile.js:83:29) 
node-pre-gyp ERR! stack  at emitTwo (events.js:106:13) 
node-pre-gyp ERR! stack  at ChildProcess.emit (events.js:192:7) 
node-pre-gyp ERR! stack  at maybeClose (internal/child_process.js:890:16) 
node-pre-gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) 
node-pre-gyp ERR! System Linux 4.4.0-75-generic 
node-pre-gyp ERR! command "/usr/local/bin/node" "/home/..../node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" 
node-pre-gyp ERR! cwd /home/..../node_modules/realm 
node-pre-gyp ERR! node -v v7.5.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/..../node_modules/realm/compiled/node-v51_linux_ia32/realm.node --module_name=realm --module_path=/home/..../node_modules/realm/compiled/node-v51_linux_ia32' (1) 
npm ERR! code ELIFECYCLE 
npm ERR! errno 1 
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 realm 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 

ノードバージョン7.5.0とnpmバージョン4.5.0を使用しています。 私はnode-pre-gypパッケージを持っています。 何が起こっているのですか?

答えて

1

npm install --save [email protected] 

オープンnode_modules /分野/ package.jsonプロジェクトフォルダ内の古いバージョンをインストールし、ステップによって次のステップを試してみて、この行削除:

"postlink": "node_modules/realm/scripts/rnpm-postlink.js" 

をリンク

react-native link realm 

この溶液が見つかったhere

+0

それは働いた!ありがとうございました!!私はどこにでもいると思った。これは、この問題に対する公式のStackOverflowの答えです。なぜなら、リンクされたソリューションは覚悟しているからです! – Progoogler

関連する問題