我有一个非常简单的typeorm,pg设置和脚本只是纱开发。我得到这个错误不知何故。
AssertionError [ERR_ASSERTION]: unknown message code: 4a
at Parser.handlePacket (/Users/dmitriyshin.io/Desktop/Web/React/1. Courses Projects/Uber Clone with TypeScript, Apollo, GraphQL and NodeJS/nuber-server/node_modules/pg-protocol/src/parser.ts:198:16)
at Parser.parse (/Users/dmitriyshin.io/Desktop/Web/React/1. Courses Projects/Uber Clone with TypeScript, Apollo, GraphQL and NodeJS/nuber-server/node_modules/pg-protocol/src/parser.ts:101:30)
at Socket.<anonymous> (/Users/dmitriyshin.io/Desktop/Web/React/1. Courses Projects/Uber Clone with TypeScript, Apollo, GraphQL and NodeJS/nuber-server/node_modules/pg-protocol/src/index.ts:7:48)
at Socket.emit (events.js:315:20)
at Socket.EventEmitter.emit (domain.js:483:12)
at addChunk (_stream_readable.js:295:12)
at readableAddChunk (_stream_readable.js:271:9)
at Socket.Readable.push (_stream_readable.js:212:10)
at TCP.onStreamRead (internal/stream_base_commons.js:186:23)
[nodemon] app crashed - waiting for file changes before starting...
2条答案
按热度按时间z31licg01#
此问题是由postgres连接问题引起地(连接器报告一条不适当地消息);
解决方案:检查postgres安装以及它是否正在运行
n7taea2i2#
这个问题也发生在你试图连接postrgres与mysql连接字符串。更多详情here。
一个临时的解决方案是全局处理uncaughtException