gpt4 book ai didi

node.js - Heroku node.js redis部署错误

转载 作者:IT王子 更新时间:2023-10-29 06:00:54 24 4
gpt4 key购买 nike

我试图将我的 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 . 解决了问题。

关于node.js - Heroku node.js redis部署错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12011894/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com