node.js heroku – app / web.1:错误:没有指定模板

我在我的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" 

       

网上收集的解决方案 "node.js heroku – app / web.1:错误:没有指定模板"

在代码中的某处,您正在调用adaro的engine()函数而不提供file参数:

如果它在本地工作,请检查更新的版本是否破坏了express,dust,adaro等之间的相互兼容性:

 rm -rf node_modules npm install --quiet --production npm start 

最好在package.json中设置固定版本( npm install --save --save-exact foobar )。

我们无法解决这个问题。 与heroku支持团队交谈,被告知应该是一个应用程序问题。 但我们的应用程序在本地开发环境中运行良好 然后,我们在aws中部署了我们的应用程序,作为解决此问题的解决方法。