Didn't I supply the dialect?

75 Views Asked by At

I'm trying to create a database with Sequelize. I keep getting this error.

Error: Dialect needs to be explicitly supplied as of v4.0.0 at new Sequelize

Here's my "new Sequelize" constructor (or whatever you call it):

    var sequelize = new Sequelize("seqGenZoo_db", "root", {
  host: "localhost",
  dialect: "mysql",
  pool: {
    max: 5,
    min: 0,
    idle: 10000
  }
});

Looks like the dialect is provided. What's the deal? I've installed the mysql and mysql2 nmp packages, if that means anything.

1

There are 1 best solutions below

0
Anatoly On

Error 1045 indeed means you have incorrect user/password pair. And according to the official documentation you should indicate database, username, password and options parameters:

public constructor(database: string, username: string, password: string, options: Object)