2013-01-09 33 views
1

我有一個小型的node.js應用程序在heroku上運行。一切都很好,直到今天。Heroku Node JS應用程序錯誤 - 說它找不到我的主模塊

我在我的一個.jade文件中做了一個小改動,然後重新部署。現在我在我的Heroku的日誌得到這個:

2013-01-09T20:44:40+00:00 heroku[slugc]: Slug compilation started 
2013-01-09T20:44:53+00:00 heroku[api]: Release v36 created by [email protected] 
2013-01-09T20:44:53+00:00 heroku[api]: Deploy c299759 by [email protected] 
`013-01-09T20:44:55+00:00 heroku[web.1]: Starting process with command `node ./doniewebapp.js 
2013-01-09T20:44:56+00:00 app[web.1]:  at Function.Module._resolveFilename (module.js:338:15) 
2013-01-09T20:44:56+00:00 app[web.1]:  throw err; 
2013-01-09T20:44:56+00:00 app[web.1]:  at Function.Module._load (module.js:280:25) 
'013-01-09T20:44:56+00:00 app[web.1]: Error: Cannot find module '/app/doniewebapp.js 
2013-01-09T20:44:56+00:00 app[web.1]:  at process.startup.processNextTick.process._tickCallback (node.js:244:9) 
2013-01-09T20:44:56+00:00 app[web.1]: 
2013-01-09T20:44:56+00:00 app[web.1]: module.js:340 
2013-01-09T20:44:56+00:00 app[web.1]:   ^
2013-01-09T20:44:56+00:00 app[web.1]:  at Module.runMain (module.js:492:10) 
2013-01-09T20:44:57+00:00 heroku[web.1]: Process exited with status 1 
2013-01-09T20:44:54+00:00 heroku[slugc]: Slug compilation finished 
2013-01-09T20:44:53+00:00 heroku[web.1]: State changed from crashed to starting 
2013-01-09T20:44:57+00:00 heroku[web.1]: State changed from starting to crashed 

我證實,doniewebapp.js文件仍然存在,而且我甚至可以運行應用程序,如果我用

heroku run node doniewebapp.js 

任何想法大大讚賞。

回答

1

我有同樣的麻煩。

用命令`node ./doniewebapp.js啓動進程< - 反引用不存在。

$ vi Procfile 
:set fileformat=unix 
:w 

我已經解決了這個問題。

+0

謝謝,很好找。是的,我正在使用Windows機器。將行結束符更改爲unix修復它。由於我在Windows機器上,我用我可靠的Notepad ++來進行更改,而不是vi。 – SteveDonie

相關問題