我在我的heroku node.js应用程序中收到此错误。它运行正常,每当我们尝试访问应用程序时都会突然看到此错误,并且我们收到“内部服务器错误”。相同的node.js应用程序在我的本地运行正常。请让我知道如何解决此问题。与heroku支持一起发言,但他们无能为力。
Aug 27 21:42:22 careerconnections app/web.1: Error: no template specified
Aug 27 21:42:22 careerconnections app/web.1: at engine (/app/node_modules/adaro/lib/engine.js:90:29)
Aug 27 21:42:22 careerconnections app/web.1: at View.proto.render (/app/node_modules/engine-munger/lib/expressView.js:45:9)
Aug 27 21:42:22 careerconnections app/web.1: at tryRender (/app/node_modules/express/lib/application.js:639:10)
Aug 27 21:42:22 careerconnections app/web.1: at EventEmitter.render (/app/node_modules/express/lib/application.js:591:3)
Aug 27 21:42:22 careerconnections app/web.1: at ServerResponse.render (/app/node_modules/express/lib/response.js:961:7)
Aug 27 21:42:22 careerconnections app/web.1: at serverError (/app/node_modules/kraken-js/middleware/500.js:31:17)
Aug 27 21:42:22 careerconnections app/web.1: at serverError (eval at createToggleWrapper (/app/node_modules/kraken-js/node_modules/meddleware/index.js:133:51), <anonymous>:1:77)
Aug 27 21:42:22 careerconnections app/web.1: at Layer.handle_error (/app/node_modules/express/lib/router/layer.js:71:5)
Aug 27 21:42:22 careerconnections app/web.1: at trim_prefix (/app/node_modules/express/lib/router/index.js:310:13)
Aug 27 21:42:22 careerconnections app/web.1: at /app/node_modules/express/lib/router/index.js:280:7
Aug 27 21:42:22 careerconnections app/web.1: at Function.process_params (/app/node_modules/express/lib/router/index.js:330:12)
Aug 27 21:42:22 careerconnections app/web.1: at IncomingMessage.next (/app/node_modules/express/lib/router/index.js:271:10)
Aug 27 21:42:22 careerconnections app/web.1: at done (/app/node_modules/express/lib/response.js:956:25)
Aug 27 21:42:22 careerconnections app/web.1: at engine (/app/node_modules/adaro/lib/engine.js:90:20)
Aug 27 21:42:22 careerconnections app/web.1: at View.proto.render (/app/node_modules/engine-munger/lib/expressView.js:45:9)
Aug 27 21:42:22 careerconnections app/web.1: at tryRender (/app/node_modules/express/lib/application.js:639:10)
Aug 27 21:42:22 careerconnections heroku/router: at=info method=GET path="/favicon.ico" host=careerconnections.herokuapp.com request_id=ed9bab4f-42c4-4734-8a22-22e174e90f3f fwd="221.135.191.2,173.224.163.83" dyno=web.1 connect=1ms service=93ms status=500 bytes=238
Aug 27 21:42:22 careerconnections app/web.1: ::ffff:10.171.126.71 - - [28/Aug/2015:04:42:21 +0000] "GET /favicon.ico HTTP/1.1" 500 22 "https://careerconnections.herokuapp.com/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36"
答案 0 :(得分:0)
在代码中的某处,您调用adaro的engine()
函数而不提供file
参数:
如果它在本地工作,请检查更新版本是否没有破坏express,dust,adaro等之间的相互兼容性:
rm -rf node_modules
npm install --quiet --production
npm start
最好在package.json(npm install --save --save-exact foobar
)中设置固定版本。
答案 1 :(得分:0)
我们无法解决此问题。与heroku支持团队交谈并被告知应该是应用程序问题。但我们的应用程序在本地开发环境中运行正常然后,我们在aws中部署了我们的应用程序,作为解决该问题的解决方法。