在git push上Heroku“错误:生成ENOENT”错误

时间:2013-03-21 15:59:03

标签: node.js heroku npm

git push收益:

登录

[snip]

   mongodb@1.2.14 node_modules/mongodb
   └── bson@0.1.8
   npm ERR! Error: spawn ENOENT
   npm ERR!     at errnoException (child_process.js:945:11)
   npm ERR!     at Process.ChildProcess._handle.onexit (child_process.js:736:34)
   npm ERR! If you need help, you may report this log at:
   npm ERR!     <http://github.com/isaacs/npm/issues>
   npm ERR! or email it to:
   npm ERR!     <npm-@googlegroups.com>

   npm ERR! System Linux 2.6.32-350-ec2
   npm ERR! command "/tmp/node-node-HW9B/bin/node" "/tmp/node-npm-bxOq/cli.js" "rebuild"
   npm ERR! cwd /tmp/build_20l204f433b3o
   npm ERR! node -v v0.10.0
   npm ERR! npm -v 1.2.12
   npm ERR! syscall spawn
   npm ERR! code ENOENT
   npm ERR! errno ENOENT
   npm ERR! 
   npm ERR! Additional logging details can be found in:
   npm ERR!     /tmp/build_20l204f433b3o/npm-debug.log
   npm ERR! not ok code 0
! Failed to rebuild dependencies with npm
! Heroku push rejected, failed to compile Node.js app

在我的机器上本地编译工作正常。

packages.json

{
  "name":        "hosted-hubot",
  "version":     "2.4.8",
  "author":      "GitHub Inc.",
  "keywords":    "github hubot campfire bot",
  "description": "A simple helpful Robot for your Company",
  "licenses":     [{
    "type":       "MIT",
    "url":        "http://github.com/github/hubot/raw/master/LICENSE"
  }],

  "repository" : {
    "type": "git",
    "url":  "https://github.com/github/hubot.git"
  },

  "dependencies": {
    "hubot-hipchat": ">=2.4.5",
    "hubot":         ">=2.4.8",
    "optparse":      "1.0.3",
    "mongodb":       "*",
    "githubot":      "0.2.0",
    "date-utils":    ">=1.2.5",
    "underscore":    ">=1.3.3",
    "underscore.string": ">=2.1.1"
  },

  "engines": {
    "node": ">= 0.10.x",
    "npm":  ">=1.1.x"
  }
}

1 个答案:

答案 0 :(得分:0)

node_modules删除.gitignore是我的临时修复。