推拒绝,无法编译Node.js应用程序heroku [英] Push rejected, failed to compile Node.js app heroku

查看:124
本文介绍了推拒绝,无法编译Node.js应用程序heroku的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我试图用 git push heroku master 将我的nodejs应用推送到heroku时,我得到了这个结果:

When I tried to push my nodejs app to heroku with git push heroku master, i got this:

Counting objects: 975, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (862/862), done.
Writing objects: 100% (975/975), 3.74 MiB | 80.00 KiB/s, done.
Total 975 (delta 70), reused 0 (delta 0)

-----> Node.js app detected
-----> Resolving engine versions
   Using Node.js version: 0.10.15
   Using npm version: 1.3.3
-----> Fetching Node.js binaries
-----> Vendoring node into slug
-----> Installing dependencies with npm
   npm ERR! install Couldn't read dependencies
!     Push rejected, failed to compile Node.js app

To git@heroku.com:hidden-reaches-9268.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:hidden-reaches-9268.git'

这是我的package.json:

And this is my package.json:

{
  "name": "fnBoard",
  "version": "0.0.1",
  "private": true,
  "scripts": {
  "start": "node server.js"
},

  "dependencies": {
   "socket.io": "0.9.x"
},
   "engines": {
     "node": "0.10.x",
     "npm": "1.3.x"
   }
}

里面有一堆错误,我不知道为什么会发生这种情况。请帮忙。 -thanks

There's a bunch of error inside and I have no idea why this happen. please help. -thanks

推荐答案

最简单的方法是将node_modules添加到.gitignore中。这里有更多信息:无法将node.js应用程序部署到heroku

The easiest way to make this work is to add node_modules to your .gitignore. Lots more info here: Fail to deploy node.js application to heroku

这篇关于推拒绝,无法编译Node.js应用程序heroku的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆