Olá pessoal estou recebendo esse erro, quando vou fazer a migração do banco de dados. Alguém pode ajudar?
C:\WorkSpace\node-ORMSequelize-MySQL>npx sequelize-cli db:migrate
Sequelize CLI [Node: 18.10.0, CLI: 6.5.1, ORM: 6.25.2]
ERROR: Cannot find "C:\WorkSpace\node-ORMSequelize-MySQL\api\config\database.json". Have you run "sequelize init"?
ERROR: Cannot read properties of undefined (reading 'detail')
sequelize db:migrate
Run pending migrations
Opções:
--version Exibe a versão [booleano]
--help Exibe ajuda [booleano]
--env The environment to run the command in [string] [padrão: "development"]
--config The path to the config file [string]
--options-path The path to a JSON file with additional options[string]
--migrations-path The path to the migrations folder
[string] [padrão: "migrations"]
--seeders-path The path to the seeders folder
[string] [padrão: "seeders"]
--models-path The path to the models folder
[string] [padrão: "models"]
--url The database connection string to use. Alternative to
using
--config files [string]
--debug When available show various debug information
[booleano] [padrão: false]
--to Migration name to run migrations until [string]
--from Migration name to start migrations from (excluding)
[string]
--name Migration name. When specified, only this migration
will be run. Mutually exclusive with --to and --from
[string]
TypeError: Cannot read properties of undefined (reading 'detail')
at Object.error (C:\WorkSpace\node-ORMSequelize-MySQL\node_modules\sequelize-cli\lib\helpers\view-helper.js:43:24)
at C:\WorkSpace\node-ORMSequelize-MySQL\node_modules\sequelize-cli\lib\commands\migrate.js:88:39
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async exports.handler (C:\WorkSpace\node-ORMSequelize-MySQL\node_modules\sequelize-cli\lib\commands\migrate.js:34:7)