2016-11-22 30 views
0

部署到Heroku的,我想这个应用程序部署https://github.com/thefailtheory/neofreelance我对我的http://livecoding.tv通道 深化发展到Heroku的,但我面临的一个错误如何将的NodeJS应用与github上

的应用是基本的,它会尝试解决在云中的自由职业者的问题,我每天使用

这里是日志:

2016-11-22T16:20:34.454131+00:00 app[web.1]: npm ERR! code ELIFECYCLE 

2016-11-22T16:20:34.454297+00:00 app[web.1]: npm ERR! [email protected] start: `node app.js` 

2016-11-22T16:20:34.454450+00:00 app[web.1]: npm ERR! Exit status 1 

2016-11-22T16:20:34.454616+00:00 app[web.1]: npm ERR! 

2016-11-22T16:20:34.454772+00:00 app[web.1]: npm ERR! Failed at the [email protected] start script 'node app.js'. 

2016-11-22T16:20:34.454931+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed. 

2016-11-22T16:20:34.455081+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the neofreelance package, 

2016-11-22T16:20:34.455232+00:00 app[web.1]: npm ERR! not with npm itself. 

2016-11-22T16:20:34.455378+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system: 

2016-11-22T16:20:34.455537+00:00 app[web.1]: npm ERR!  node app.js 

2016-11-22T16:20:34.455684+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with: 

2016-11-22T16:20:34.455833+00:00 app[web.1]: npm ERR!  npm bugs neofreelance 

2016-11-22T16:20:34.456007+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via: 

2016-11-22T16:20:34.456156+00:00 app[web.1]: npm ERR!  npm owner ls neofreelance 

2016-11-22T16:20:34.456302+00:00 app[web.1]: npm ERR! There is likely additional logging output above. 

2016-11-22T16:20:34.459887+00:00 app[web.1]: 

2016-11-22T16:20:34.460174+00:00 app[web.1]: npm ERR! Please include the following file with any support request: 

2016-11-22T16:20:34.460356+00:00 app[web.1]: npm ERR!  /app/npm-debug.log 
+0

您没有'Procfile'? – nicovank

+0

我已经通过Dropbox部署了一个应用程序,它没有它的工作,我应该有一个与nodejs? – thefailtheory

+0

它正在工作,但我不认为依靠默认行为是安全的(即Heroku将默认运行'npm start')。 – nicovank

回答

1

这是因为块范围的声明(letconst)在节点版本中尚不支持Heroku在严格模式之外使用。

所以两个选项:

  • 在你的文件
  • 使用var,而不是let的开头添加"use strict";
+0

'let'可以很好地与另一个项目和Dropbox一起部署,所以我将尝试第一个选项 – thefailtheory

+0

我实际上在heroku上再次上传你的项目,并更改为var工作... – nicovank

+0

thx很多人它与它合作 – thefailtheory