sequelize: Azure: Error: Please install tedious package manually

Issue Description

Error: Please install tedious package manually

This is the error i’m getting. I’ve seen threads before, about this issue - none of them work at the moment.

What are you doing?

My node server is hosted somewhere, connecting to a sql server on Azure cloud. Using Sequelize, tedious, mssql.

const Sequelize = require('sequelize/index').Sequelize;

const sequelize = new Sequelize(
  process.env.DATABASE,
  process.env.DATABASE_USER,
  process.env.DATABASE_PASSWORD,
  {
    host: process.env.DATABASE_HOST,
    dialect: 'mssql',
    // dialectModule: 'tedious',
    dialectOptions: {
      options: {
        encrypt: true,
        useUTC: false,
        dateFirst: 1,
        trustServerCertificate: true,
        enableArithAbort: false,
      },
    },
  }
);

module.exports = sequelize;

What do you expect to happen?

Have a working connection like i do on localhost

What is actually happening?

Error: Please install tedious package manually
   at ConnectionManager._loadDialectModule (D:\home\site\wwwroot\node_modules\sequelize\lib\dialects\abstract\connection-manager.js:81:15)
   at new ConnectionManager (D:\home\site\wwwroot\node_modules\sequelize\lib\dialects\mssql\connection-manager.js:17:21)
   at new MssqlDialect (D:\home\site\wwwroot\node_modules\sequelize\lib\dialects\mssql\index.js:14:30)
   at new Sequelize (D:\home\site\wwwroot\node_modules\sequelize\lib\sequelize.js:324:20)
   at Object.<anonymous> (D:\home\site\wwwroot\util\database.js:3:19)
   at Module._compile (internal/modules/cjs/loader.js:956:30)
   at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
   at Module.load (internal/modules/cjs/loader.js:812:32)
   at Function.Module._load (internal/modules/cjs/loader.js:724:14)
   at Module.require (internal/modules/cjs/loader.js:849:19)
   at require (internal/modules/cjs/helpers.js:74:18)
   at Object.<anonymous> (D:\home\site\wwwroot\server.js:6:19)
   at Module._compile (internal/modules/cjs/loader.js:956:30)
   at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
   at Module.load (internal/modules/cjs/loader.js:812:32)
   at Function.Module._load (internal/modules/cjs/loader.js:724:14)
   at Module.require (internal/modules/cjs/loader.js:849:19)
   at require (internal/modules/cjs/helpers.js:74:18)
   at Object.<anonymous> (D:\Program Files (x86)\iisnode\interceptor.js:459:1)
   at Module._compile (internal/modules/cjs/loader.js:956:30)
   at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
   at Module.load (internal/modules/cjs/loader.js:812:32)
Application has thrown an uncaught exception and is terminated:
Error: Please install tedious package manually
   at ConnectionManager._loadDialectModule (D:\home\site\wwwroot\node_modules\sequelize\lib\dialects\abstract\connection-manager.js:81:15)
   at new ConnectionManager (D:\home\site\wwwroot\node_modules\sequelize\lib\dialects\mssql\connection-manager.js:17:21)
   at new MssqlDialect (D:\home\site\wwwroot\node_modules\sequelize\lib\dialects\mssql\index.js:14:30)
   at new Sequelize (D:\home\site\wwwroot\node_modules\sequelize\lib\sequelize.js:324:20)
   at Object.<anonymous> (D:\home\site\wwwroot\util\database.js:3:19)
   at Module._compile (internal/modules/cjs/loader.js:956:30)
   at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
   at Module.load (internal/modules/cjs/loader.js:812:32)
   at Function.Module._load (internal/modules/cjs/loader.js:724:14)
   at Module.require (internal/modules/cjs/loader.js:849:19)
   at require (internal/modules/cjs/helpers.js:74:18)
   at Object.<anonymous> (D:\home\site\wwwroot\server.js:6:19)
   at Module._compile (internal/modules/cjs/loader.js:956:30)
   at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
   at Module.load (internal/modules/cjs/loader.js:812:32)
   at Function.Module._load (internal/modules/cjs/loader.js:724:14)
   at Module.require (internal/modules/cjs/loader.js:849:19)
   at require (internal/modules/cjs/helpers.js:74:18)
   at Object.<anonymous> (D:\Program Files (x86)\iisnode\interceptor.js:459:1)
   at Module._compile (internal/modules/cjs/loader.js:956:30)
   at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
   at Module.load (internal/modules/cjs/loader.js:812:32)

Environment

  • Sequelize version: 5.21.7
  • Node.js version: 13.9.0
  • Operating System: Windows 10 x64

How does this problem relate to dialects?

  • I don’t know, I was using ‘mssql’, with tedious version 8.0.3 and sql server on Azure

Would you be willing to resolve this issue by submitting a Pull Request?

  • No, I don’t have the time and I wouldn’t even know how to start. don’t have the know how

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (10 by maintainers)

Most upvoted comments

Run this command to find out if you got Sequelize installed globally by mistake

npm ls -g --depth=0

Should print something like this

/home/sushant/.nvm/versions/node/v12.16.1/lib
+-- firebase-tools@8.0.2
+-- flow-typed@3.1.0
+-- flowgen@1.10.0
+-- http-server@0.12.3
+-- node-pre-gyp@0.14.0
`-- npm@6.14.4

If you find sequelize or tedious in that list, remove them with

npm uninstall -g sequelize tedious

After that do a fresh npm install under your project.