Node.js mssql error: tedious deprecated The default value for `config.options.enableArithAbort` will change from `false` to `true`

Node.js mssql error: tedious deprecated The default value for `config.options.enableArithAbort` will change from `false` to `true`

我收到以下错误。我该如何解决?

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

将您的数据库配置选项更改为以下内容:

     var config = {
      user: 'username',
      password: 'password',
      server: 'localhost', 
      database: 'databasename',
      "options": {
        "encrypt": true,
        "enableArithAbort": true
        }
   };

在此处阅读问题详情:https://github.com/tediousjs/node-mssql/issues/976

不要在项目的配置中设置,而是在 node_modules 中设置值 node_modules/sequelize/lib/dialects/mssql/connection-manager.js.

options: {
   enableArithAbort: true,//<----------set this to true
   port: parseInt(config.port, 10),
   database: config.database,
   trustServerCertificate: true
}

以下对我有用:

const config = {

    user: 'sa',

    password: '<YOUR_PASSWORD>',

    server: '<COMPUTER_NAME>\SQLEXPRESS',

    database: '<DBNAME>',

    requestTimeout: 180000, // for timeout setting

    connectionTimeout: 180000, // for timeout setting

      "options": {

        "encrypt": false, // need to stop ssl checking in case of local db

        "enableArithAbort": true

        }
}