【问题标题】:Heroku "Error: spawn ENOENT" error on git pushgit push上的Heroku“错误:生成ENOENT”错误
【发布时间】:2013-03-22 18:00:40
【问题描述】:

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"
  }
}

【问题讨论】:

  • 同样的问题...联系了 Heroku 支持,他们只说尝试重新部署。 :-\
  • 我已经尝试了大约 10 次,放弃了... :(

标签: node.js heroku npm


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-03
    • 2016-12-26
    • 1970-01-01
    • 2017-12-14
    • 1970-01-01
    • 2014-10-26
    相关资源
    最近更新 更多