node.js heroku - app/web.1 : Error: no template specified

标签 node.js heroku

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

最佳答案

在代码中的某个位置,您调用了 adaro 的 engine() 函数,但没有提供 file 参数:

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

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

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

关于node.js heroku - app/web.1 : Error: no template specified,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32263577/

相关文章:

sql - 在 Node.js 中捕获 SQL 错误

node.js - 我想升级 Node 环回应用程序中的所有 npm 包

javascript - Meteor.js 服务器端代码可以对客户端上的 session 变量使用react吗

angularjs - 错误: [ngRepeat:dupes] Using MEAN w/Heroku

ruby-on-rails - 来自 rake Assets 的详细输出 :precompile

python - 找不到部署 Heroku 的 WSGI 模块

node.js - 如何让我的 Node.js 应用程序集群化以仅运行一次任务?

javascript - 更改环回中检索的默认顺序

python - 如何在Heroku上安装python opencv?

Node.js Heroku部署错误503