我已经搜索了很多stackoverflow q/a,但仍然无法解决这个问题.我正在尝试将我的节点js应用程序部署到Heroku,并不断收到错误.我可以在当地运行它就好了.
错误:
2014-10-17T13:47:11.174606+00:00 heroku[web.1]: State changed from crashed to starting
2014-10-17T13:47:13.312806+00:00 heroku[web.1]: Starting process with command `node index.js`
2014-10-17T13:47:14.494495+00:00 app[web.1]: module.js:340
2014-10-17T13:47:14.493848+00:00 app[web.1]:
2014-10-17T13:47:14.504444+00:00 app[web.1]: at Function.Module._resolveFilename (module.js:338:15)
2014-10-17T13:47:14.504440+00:00 app[web.1]: Error: Cannot find module '/app/index.js'
2014-10-17T13:47:14.494889+00:00 app[web.1]: throw err;
2014-10-17T13:47:14.495090+00:00 app[web.1]: ^
2014-10-17T13:47:14.504450+00:00 app[web.1]: at node.js:906:3
2014-10-17T13:47:14.504449+00:00 app[web.1]: at startup (node.js:119:16)
2014-10-17T13:47:14.504447+00:00 app[web.1]: at Function.Module.runMain (module.js:497:10)
2014-10-17T13:47:14.504446+00:00 app[web.1]: at Function.Module._load (module.js:280:25)
2014-10-17T13:47:15.551015+00:00 heroku[web.1]: State changed from crashed to starting
2014-10-17T13:47:15.550391+00:00 heroku[web.1]: State changed from starting to crashed
2014-10-17T13:47:15.538661+00:00 heroku[web.1]: …Run Code Online (Sandbox Code Playgroud)