1
NodeJSアプリをHerokuに配備する際に問題があります。私は他のスタックオーバーフローの質問に提案を試してみましたプッシュに失敗しました! [リモート拒否] master - > master(pre-receiveフックが拒否されました)
remote: Building source:
remote:
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NPM_CONFIG_PRODUCTION=true
remote: NODE_VERBOSE=false
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): 5.3.0
remote: engines.npm (package.json): unspecified (use default)
remote:
remote: Resolving node version 5.3.0...
remote: Downloading and installing node 5.3.0...
remote: Detected package-lock.json: defaulting npm to version 5.x.x
remote: Bootstrapping npm 5.x.x (replacing 3.3.12)...
remote: npm 5.5.1 installed
remote:
remote: -----> Restoring cache
remote: Skipping cache restore (not-found)
remote:
remote: -----> Building dependencies
remote: Installing node modules (package.json + package-lock)
remote: npm ERR! Buffer.alloc is not a function
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR! /app/.npm/_logs/2017-10-21T22_24_56_159Z-debug.log
remote:
remote: -----> Build failed
remote:
remote: We're sorry this build is failing! You can troubleshoot common issues here:
remote: https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:
remote: If you're stuck, please submit a ticket so we can help:
remote: https://help.heroku.com/
remote:
remote: Love,
remote: Heroku
remote:
remote: ! Push rejected, failed to compile Node.js app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to young-ridge-96999.
remote:
To https://git.heroku.com/young-ridge-96999.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/young-ridge-96999.git
: これは誤りである アプリ用.gitignore
がありnode_modules/
package.jsonは
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server.js"
},
アイブ氏が試しています新しい支店を作り、新しい支店でヘロクに進出する
そして
git add .
git commit -a -m'comment'
git push
おかげ
[TypeError:Buffer.allocは関数ではありません](https://stackoverflow.com/questions/36499840/typeerror-buffer-alloc-is-not-a-function) – max630