如果我尝试开始领班,则会收到以下消息。我不确定该如何进一步解决。我猜想它与表达有关的错误,但仍然非常感谢您解决此错误的任何帮助!
2013-04-21T10:39:54.622588+00:00 heroku[api]: Deploy fc0f862 by [email protected]
2013-04-21T10:39:54.695655+00:00 heroku[web.1]: State changed from crashed to starting
2013-04-21T10:39:54.972645+00:00 heroku[slugc]: Slug compilation finished
2013-04-21T10:39:55.470897+00:00 heroku[web.1]: Starting process with command `node server/server.js`
2013-04-21T10:39:56.617617+00:00 app[web.1]:
2013-04-21T10:39:56.618147+00:00 app[web.1]: server = module.exports = express();
2013-04-21T10:39:56.617811+00:00 app[web.1]: /app/server/server.js:7
2013-04-21T10:39:56.618147+00:00 app[web.1]: ^
2013-04-21T10:39:56.621350+00:00 app[web.1]: TypeError: object is not a function
2013-04-21T10:39:56.621350+00:00 app[web.1]: at process.startup.processNextTick.process._tickCallback (node.js:244:9)
2013-04-21T10:39:56.621350+00:00 app[web.1]: at Module.runMain (module.js:492:10)
2013-04-21T10:39:56.621350+00:00 app[web.1]: at Function.Module._load (module.js:312:12)
2013-04-21T10:39:56.621350+00:00 app[web.1]: at Object.Module._extensions..js (module.js:467:10)
2013-04-21T10:39:56.621350+00:00 app[web.1]: at Module._compile (module.js:449:26)
2013-04-21T10:39:56.621350+00:00 app[web.1]: at Module.load (module.js:356:32)
2013-04-21T10:39:56.621350+00:00 app[web.1]: at Object.<anonymous> (/app/server/server.js:7:31)
2013-04-21T10:39:57.852895+00:00 heroku[web.1]: Process exited with status 1
2013-04-21T10:39:57.867532+00:00 heroku[web.1]: State changed from starting to crashed
2013-04-21T10:40:37.078893+00:00 heroku[api]: Scale to web=1 by [email protected]
最佳答案
当您的代码需要Express 3.x版本,但Express模块是2.x版本时,您将收到该错误。
关于node.js - 在Node.js中启动工头时出错,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/16130107/