在创建ormconfig之后,使用MSSQl应用程序创建NestJS,并获取参考。
获取警告消息的方式如下:
[Nest] 12236 - 05/23/2020, 6:27:56 PM [NestFactory] Starting Nest application...
tedious deprecated The default value for `config.options.enableArithAbort` will change from `false` to `true` in the next major version of `tedious`. Set the value to `true` or `false` explicitly to silence this message. node_modules\mssql\lib\tedious\connection-pool.js:61:23对此有什么想法。如果需要任何细节,请让我知道。
ORM配置详细信息。
{
"type": "mssql",
"host": "REETPC",
"port": 1433,
"username": "sa",
"password": "password1",
"database": "test12",
"synchronize": true,
"entities": [
"dist/Entity/*.js"
],
"cli": {
"entitiesDir": "src/entity"
}
}Package.JSOn文件详细信息。
"dependencies": {
"@nestjs/common": "^7.0.0",
"@nestjs/core": "^7.0.0",
"@nestjs/platform-express": "^7.0.0",
"@nestjs/typeorm": "^7.0.0",
"dotenv": "^8.2.0",
"mssql": "^6.2.0",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"rxjs": "^6.5.4",
"typeorm": "^0.2.25",
"typescript": "^3.0.1"
},发布于 2020-05-24 18:50:21
在您的连接选项中,您应该添加:
extra: {
options: {
enableArithAbort: true // or `false`. Just set it explicitly to silence the warning message
}
}发布于 2021-06-04 17:46:09
对于像我这样面临这个问题但使用环境变量连接到他们的数据库的人来说,你需要像这样设置TYPEORM_DRIVER_EXTRA (enableArithAbort需要在option对象中)
TYPEORM_DRIVER_EXTRA='{ "options": { "enableArithAbort": true } }'发布于 2020-05-24 08:03:20
您应该提供您的ormconfig,以便任何人都可以帮助您。顺便说一下,这看起来像是node-mssql驱动程序的问题,而不是TypeoORM本身的问题。
https://stackoverflow.com/questions/61972498
复制相似问题