2016-08-07 14 views
0

私はパスワードなし例えばgithubのレポ(https://github.com/rbudiharso/smsauth-example)のクローンが、私が何をしようとすると、NPMはpackage.jsonは、パスワードなしとmongostore

ERRは、以下のメッセージがポップアップ表示を開始

からインストールしてください。

エラーメッセージの1つは、node-gyp rebuildのうち、わかりません。

もう1つのエラーメッセージには、problem with bcryptがあります。

私がインストールしようとしたが、(npmで利用可能)passwordless-mongostoreた失敗したモジュール

私はnode-gypをインストールしようとしたときに、以下のエラー・ログがまだ存在しています。

WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR 
gyp ERR! configure error 
gyp ERR! stack Error: Can't find Python executable "/path/to/executable/python2.7", you can set the PYTHON env variable. 
gyp ERR! stack  at failNoPython (/home/ubuntu/.nvm/versions/node/v4.4.5/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:401:14) 
gyp ERR! stack  at /home/ubuntu/.nvm/versions/node/v4.4.5/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:330:11 
gyp ERR! stack  at F (/home/ubuntu/.nvm/versions/node/v4.4.5/lib/node_modules/npm/node_modules/which/which.js:70:16) 
gyp ERR! stack  at E (/home/ubuntu/.nvm/versions/node/v4.4.5/lib/node_modules/npm/node_modules/which/which.js:82:29) 
gyp ERR! stack  at /home/ubuntu/.nvm/versions/node/v4.4.5/lib/node_modules/npm/node_modules/which/which.js:91:16 
gyp ERR! stack  at /home/ubuntu/.nvm/versions/node/v4.4.5/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5 
gyp ERR! stack  at /home/ubuntu/.nvm/versions/node/v4.4.5/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5 
gyp ERR! stack  at FSReqWrap.oncomplete (fs.js:82:15) 
gyp ERR! System Linux 4.2.0-c9 
gyp ERR! command "/home/ubuntu/.nvm/versions/node/v4.4.5/bin/node" "/home/ubuntu/.nvm/versions/node/v4.4.5/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
gyp ERR! cwd /home/ubuntu/workspace/node_modules/passwordless-mongostore/node_modules/bcrypt 
gyp ERR! node -v v4.4.5 
gyp ERR! node-gyp -v v3.3.1 
gyp ERR! not ok 
npm ERR! Linux 4.2.0-c9 
npm ERR! argv "/home/ubuntu/.nvm/versions/node/v4.4.5/bin/node" "/home/ubuntu/.nvm/versions/node/v4.4.5/bin/npm" "install" 
npm ERR! node v4.4.5 
npm ERR! npm v2.15.5 
npm ERR! code ELIFECYCLE 

npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'. 
npm ERR! This is most likely a problem with the bcrypt package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node-gyp rebuild 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs bcrypt 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR! 
npm ERR!  npm owner ls bcrypt 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  /home/ubuntu/workspace/npm-debug.log 

私はただインストールしてすべてを書き出す前にプロジェクトを実行したいのですが、誰かがこれを支援できますか?

+0

エラーメッセージがかなり明確である: "/path/to/executable/python2.7:「エラーPythonの実行可能ファイルを見つけることができません"、あなたは

passwordless-mongostore READMEには、この提案を含んでいますPYTHON env変数を設定できます。 "あなたはPythonをインストールしましたか? – Chris

+0

nope。これはnodeJSモジュールです。 –

答えて

1

paswordless-mongostoreはNPMモジュールでも、Pythonの依存関係があります。それはnode-gypに直接的および間接的に依存するbcryptに直接依存します。

node-gyp is a cross-platform command-line tool written in Node.js for compiling native addon modules for Node.js. It bundles the gyp project used by the Chromium team and takes away the pain of dealing with the various differences in build platforms.

gyp自体がwritten in Pythonであり、そしてnode-gyp直接Python code含みます。あなたが見ているエラーはconfigure.js file and is triggered when Python is not foundです。

  • は、Pythonをインストールします。

    あなたは、少なくとも2つのオプションがあります。

    環境によっては、これは単純な1行コマンドから完全に実行不可能なものまであります。

  • 他のライブラリを使用してください。 passwordless-mongostore-bcrypt-node

    Tokens are stored in a MongoDB database and are hashed and salted using bcrypt . If you have trouble installing bcrypt (esp. on Windows) you could also consider using the slower but pure-JS version of MongoStore.