2017-11-07 7 views
1

ノードアプリケーションをHerokuに配備する際に問題があります。ノードとnpmバージョンを指定してprocfileを設定しましたが、問題が再発しています。HerokuへのNodejsのデプロイメントエラー

ここにエラーログがあります。

-----> Node.js app detected 
-----> Creating runtime environment 

     NPM_CONFIG_LOGLEVEL=error 
     NPM_CONFIG_PRODUCTION=true 
     NODE_VERBOSE=false 
     NODE_ENV=production 
     NODE_MODULES_CACHE=true 
-----> Installing binaries 
     engines.node (package.json): 6.7.0 
     engines.npm (package.json): 3.10.3 

     Resolving node version 6.7.0... 
     Downloading and installing node 6.7.0... 
     npm 3.10.3 already installed with node 
-----> Restoring cache 
     Skipping cache restore (not-found) 
-----> Building dependencies 
     Prebuild detected (node_modules already exists) 
     Rebuilding any native modules 

     > [email protected] install /tmp/build_41d193481a84256234156f8c6f5f2420/goransgit-Random-Movie-ec7e060/node_modules/bcrypt 
     > node-pre-gyp install --fallback-to-build 

     sh: 1: node-pre-gyp: Permission denied 

     npm ERR! Linux 3.13.0-133-generic 
     npm ERR! argv "/tmp/build_41d193481a84256234156f8c6f5f2420/goransgit-Random-Movie-ec7e060/.heroku/node/bin/node" "/tmp/build_41d193481a84256234156f8c6f5f2420/goransgit-Random-Movie-ec7e060/.heroku/node/bin/npm" "rebuild" 
     npm ERR! node v6.7.0 
     npm ERR! npm v3.10.3 
     npm ERR! code ELIFECYCLE 
     npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build` 
     npm ERR! Exit status 126 
     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 bcrypt 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 
     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 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!  /tmp/build_41d193481a84256234156f8c6f5f2420/goransgit-Random-Movie-ec7e060/npm-debug.log 
-----> Build failed 

     We're sorry this build is failing! You can troubleshoot common issues here: 
     https://devcenter.heroku.com/articles/troubleshooting-node-deploys 

     Some possible problems: 

     - node_modules checked into source control 
     https://blog.heroku.com/node-habits-2016#9-only-git-the-important-bits 

     Love, 
     Heroku 

!  Push rejected, failed to compile Node.js app. 
!  Push failed 

ここに私のpackage.jsonファイルがあります。

{ 
    "name": "Node app", 
    "version": "1.0.0", 
    "description": "", 
    "main": "index.js", 

    "scripts": { 
    "start": "node index.js" 
    }, 

    "author": "", 
    "license": "ISC", 

    "dependencies": { 
    "bcrypt": "^1.0.3", 
    "body-parser": "^1.18.2", 
    "cookie-parser": "^1.4.3", 
    "express-session": "^1.15.6", 
    "express-validator": "^4.2.1", 
    "form-validate": "0.0.7", 
    "passport": "^0.4.0", 
    "validator": "^9.1.1" 
    }, 

    "engines" : { 
    "node" : "6.7.0", 
    "npm" : "3.10.3" 
    } 
} 

誰でも助けてくれたら、ありがとう。 AMET enim NULLA pariatur UT dolore officia sedの Nostrudのreprehenderitがirure EUのsuntのirure UT cillumのsuntのsuntにmollit veniamのadipisicing aliquipのexercitation enimのdoloreのexercitationでculpaでincididuntユタnostrud duisでfugiat ELITのexcepteurをduis BELOW

はLoremのイプサムを気にしません例外的な大規模な行為は、非暴力的な行為の結果として生じる可能性があります。犯罪の犯罪は、犯罪の犯罪に関連している可能性があります。アディピシング・シム・ア・ラムコ・プレゼンテーション・デイ・ニシ・ナー・アイ・ニュー・プロダクツ・イン・タイム・インディジット・イット・カイド・アップ・エリート・ヴィレッジ・イン・ユア・エリート人工妊娠中絶、妊娠、妊娠、妊娠、妊娠、妊娠、妊娠、妊娠、妊娠、妊娠、妊娠、妊娠、妊娠、妊娠、妊娠、妊娠、妊娠、妊娠、妊娠、妊娠、妊娠、汚れの痕跡がないか、または汚れている可能性があるかどうかを判断するために使用されていなければなりません。

答えて

0

いくつかの可能性のある問題: - node_modulesは

プットnode_modulesあなたの.gitignoreファイル内のソース管理にチェックイン。このディレクトリはgitリポジトリ内にあるべきではありません。

その後のgitからディレクトリを削除します。

git rm -r node_modules 
git commit -m "Remove node_modules directory" 

それから私はNode.jsのプロジェクトのために、このgitignoreファイルを使用することをお勧めHerokuの

にプッシュ: https://github.com/github/gitignore/blob/master/Node.gitignore

+0

をコメントでこれらの質問をしてください。 。答えは完全な解決策でなければなりません。 –

+0

「コメントするには50の評判が必要です」ので、コメントに質問することはできません。 –

関連する問題