当我尝试使用sequelize-msnodesqlv8

时间:2019-05-15 20:44:11

标签: node.js sql-server sequelize.js windows-authentication

我正在尝试通过软件包https://www.npmjs.com/package/sequelize-msnodesqlv8使用Windows身份验证,但是却出现了SequelizeConnectionError。

这是我的配置。

{
    dialect: "mssql",
    dialectModulePath: "sequelize-msnodesqlv8",
    dialectOptions: {
      driver: "SQL Server Native Client 11.0",
      trustedConnection: true
    },
    host: process.env.DEV_DB_HOSTNAME,
    database: process.env.DEV_DB_NAME
}

我得到的错误:

(node:27588) UnhandledPromiseRejectionWarning: SequelizeConnectionError
    at Connection.connection.on.err (C:\webportaltesttool\backend\node_modules\sequelize\lib\dialects\mssql\connection-manager.js:85:18)
    at Connection.emit (events.js:182:13)
    at mssql.open (C:\webportaltesttool\backend\node_modules\sequelize-msnodesqlv8\lib\connection.js:107:9)
    at Immediate._onImmediate (C:\webportaltesttool\backend\node_modules\msnodesqlv8\lib\connection.js:360:15)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)
(node:27588) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not hand
led with .catch(). (rejection id: 1)
(node:27588) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:27588) UnhandledPromiseRejectionWarning: SequelizeConnectionError
    at Connection.connection.on.err (C:\webportaltesttool\backend\node_modules\sequelize\lib\dialects\mssql\connection-manager.js:85:18)
    at Connection.emit (events.js:182:13)
    at mssql.open (C:\webportaltesttool\backend\node_modules\sequelize-msnodesqlv8\lib\connection.js:107:9)
    at Immediate._onImmediate (C:\webportaltesttool\backend\node_modules\msnodesqlv8\lib\connection.js:360:15)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)
(node:27588) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not hand
led with .catch(). (rejection id: 2)

0 个答案:

没有答案