[英]Heroku node.js redis deploy error
我正在嘗試將我的node.js應用程序推送到Heroku並收到以下錯誤:
make: *** [all] Error 1 sh: gmake: not found npm ERR! hiredis@0.1.14 preinstall: `make || gmake` npm ERR! `sh "-c" "make || gmake"` failed with 127 npm ERR! npm ERR! Failed at the hiredis@0.1.14 preinstall script. npm ERR! This is most likely a problem with the hiredis package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! make || gmake npm ERR! You can get their info via: npm ERR! npm owner ls hiredis npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.32-343-ec2
npm ERR! command "/tmp/node-node-v052/bin/node" "/tmp/node-npm-8OVn/cli.js" "rebuild"
npm ERR! cwd /tmp/build_z7yxzlw3xyyk
npm ERR! node -v v0.8.7
npm ERR! npm -v 1.1.49
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /tmp/build_z7yxzlw3xyyk/npm-debug.log
npm ERR! not ok code 0
! Failed to rebuild dependencies with npm
! Heroku push rejected, failed to compile Node.js app
這是我的package.json:
{
"name": "myapp"
, "version": "0.0.1"
, "private": true
,"engines": {
"node": "0.8.x",
"npm": "1.1.x"
}
, "dependencies": {
"express": "2.5.8"
, "jade": ">= 0.0.1"
,"ejs" : ">=0.7.1"
,"pg": ">=0.8.2"
,"moment" : ">=1.7.0"
,"async": ">=0.1.22"
,"request": ">=2.10.0"
, "connect-redis": ">= 0.0.1"
, "redis": ">= 0.0.1"
}
}
將node_modules
添加到.gitignore並運行git rm -r --cached .
解決了這個問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.