anyone knows why i am getting this error this is my code
"use strict";
const { DataTypes } = require("sequelize/types");
module.exports = {
up: async (queryInterface, DataTypes) => {
await queryInterface.createTable("dummytables", {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: DataTypes.INTEGER,
},
id: {
type: DataTypes.NUMBER,
},
first_name: {
type: DataTypes.STRING,
allowNull: false,
},
last_name: {
type: DataTypes.STRING,
allowNull: false,
},
});
},
down: async (queryInterface, DataTypes) => {
await queryInterface.dropTable("dummytables");
},
};
when am trying to run this command sequelize db:migrate
and its showing me ERROR: Cannot find module 'sequelize/types'
my dependencies file
"dependencies": {
"@types/sequelize": "^4.28.9",
"express": "^4.17.1",
"mysql2": "^2.2.5",
"sequelize": "^6.5.0",
"sequelize-cli": "^6.2.0" }
any solution need help
{ "name": "sqlSequelize", "version": "1.0.0", "description": "", "main": "app.js", "dependencies": { "express": "^4.17.1", "mysql2": "^2.2.5", "sequelize": "^6.5.0" }, "devDependencies": {}, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "", "license": "ISC" }
@Yeorgi see – Cranwell