Bry*_*omo 8 node.js express nestjs
因此,我在一家初创公司工作,该公司使用nestJs框架(略微基于express)和typeorm为我们的Db构建后端Web应用程序。因此,我们最近遇到了一个问题,即每次抛出错误(即密码不正确)时,应用都会立即崩溃。以下错误:
TypeError: layer.match is not a function
at matchLayer (/home/imuchene/apps/DocuflowApi/node_modules/express/lib/router/index.js:574:18)
at next (/home/imuchene/apps/DocuflowApi/node_modules/express/lib/router/index.js:220:15)
at Function.handle (/home/imuchene/apps/DocuflowApi/node_modules/express/lib/router/index.js:174:3)
at Function.handle (/home/imuchene/apps/DocuflowApi/node_modules/express/lib/application.js:174:10)
at Server.app (/home/imuchene/apps/DocuflowApi/node_modules/express/lib/express.js:39:9)
at Server.emit (events.js:187:15)
at Server.EventEmitter.emit (domain.js:441:20)
at parserOnIncoming (_http_server.js:672:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17)
Run Code Online (Sandbox Code Playgroud)
现在,对于上下文,我们正在javascript上使用Error类,即使我们认为这不是问题,而是抛出错误后expressjs的路由机制崩溃,也值得注意的是我们的应用程序在本地运行良好,但是一旦部署在vm上会导致问题。
| 归档时间: |
|
| 查看次数: |
198 次 |
| 最近记录: |