1
Opa, I am creating a Rest API in Nodejs and using Sequelize as ORM only when I try to use the db:create command of the sequelize to create the database, it returns me this error:
ERROR: Dialect [Object Object] does not support db:create / db:drop
I wonder how I solve this problem, here comes the code:
module.exports = {
dbconfig: {
dialect: 'mysql',
host: 'localhost:3306s',
username: 'root',
password: 'toor150',
database: 'lynho_barber',
define: {
timestamps: true,
underscored: true
}
},
};
The above code is the object that stores the sequelize parameter information
const Sequelize = require('sequelize');
const variables = require('../config/variables');
const connection = new Sequelize(variables.dbconfig);
module.exports = connection;
This above is the connection code of the sequelize.
Did the answer solve your problem? Are there any questions pending? If the question is solved, consider accepting the answer. See more details at How and why to accept an answer?
– Rafael Tavares