I have the up option filed in my seed file, but I couldn't find what the message exactly says. This error occurs when I run the command npx sequelize-cli db:seed:all
As per the link here I added the .sequelizerc file as well but it throws same error. Why this error occurs and how to solve it ? I am a beginner in node js ORM, please help me resolve it. Thanks in advance.
Note: The data was added in the db as expected
demoUser.js
'use strict';
const Data = require('./data.js')
const data = new Data()
module.exports = {
up: async (queryInterface, Sequelize) => {
return queryInterface.bulkInsert('Users', [{
firstName: "a",//data.getUserStats(),
lastName: 'Doe',
email: 'example@example.com',
createdAt: new Date(),
updatedAt: new Date()
}]);
},
down: async (queryInterface, Sequelize) => {
return queryInterface.bulkDelete('Users', null, {});
}
};
Full path to demoUser.js ../seeders/20200824140115-demo-user.js
.sequelizerc
const path = require('path');
module.exports = {
'config': path.resolve('config', 'config.json'),
'models-path': path.resolve('models'),
'seeders-path': path.resolve('seeders'),
'migrations-path': path.resolve('migrations')
};