最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

推送被拒绝,无法编译Node.js应用程序heroku

运维笔记admin8浏览0评论

推送被拒绝,无法编译Node.js应用程序heroku

推送被拒绝,无法编译Node.js应用程序heroku

[当我尝试使用git push heroku master将nodejs应用推送到heroku时,我得到了:

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 [email protected]:hidden-reaches-9268.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:hidden-reaches-9268.git'

这是我的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

回答如下:

最简单的方法是将node_modules添加到您的.gitignore中。这里有更多信息:Fail to deploy node.js application to heroku

发布评论

评论列表(0)

  1. 暂无评论