Sequelize error message gives no centext

Open
#1,519 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
22/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript, node.js
Domain
cli

Research direction

Start by reproducing sequelize-cli db:seed:all with the reported Node and CLI versions. Review server/config/config.js and .sequelizerc; the issue names no target source file, test, or acceptance criterion, so the expected diagnostic context must be defined before completion can be assessed.

Written by the indexing model from the issue text.

Description

I am running sequelize cli and this is the error I get for any command being run

sequelize-cli db:seed:all

Sequelize CLI [Node: 20.17.0, CLI: 6.6.2, ORM: 6.37.3]

Loaded configuration file "server/config/config.js".
Using environment "development".

ERROR: 

My config file:

const { config } = require('dotenv');
const path = require('path');
config({ path: path.resolve('../../.env') });

const DBConfig = {
  development: {
    username: process.env.DEV_DB_USERNAME,
    password: process.env.DEV_DB_PASSWORD,
    database: process.env.DEV_DB_DATABASE,
    port: process.env.DEV_DB_PORT,
    host: process.env.DEV_DB_HOST,
    dialect: process.env.DEV_DB_DIALECT || 'mysql',
    use_env_variable: process.env.DEV_DB_DATABASE_URL,
  },
  test: {
    username: 'root',
    password: '',
    database: 'database_test',
    port: '',
    host: '127.0.0.1',
    dialect: 'mysql',
    use_env_variable: process.env.DATABASE_URL,
  },

  production: {
    username: process.env.DB_USERNAME,
    password: process.env.DB_PASSWORD,
    database: process.env.DB_DATABASE,
    host: process.env.DB_HOST,
    dialect: process.env.DB_DIALECT || 'mysql',
    port: process.env.DB_PORT,
    use_env_variable: process.env.DB_DATABASE_URL,
  },
};

module.exports = DBConfig;

My .sequelizerc file:


const path = require('path');

module.exports = {
  config: path.resolve('server', 'config', 'config.js'),
  'models-path': path.resolve('server', 'models'),
  'seeders-path': path.resolve('server', 'database', 'seeders'),
  'migrations-path': path.resolve('server', 'database', 'migrations'),
};

Please I need help with this

Dominant language
JavaScript
Stars
2.6k
Forks
524
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sequelize/cli

All issues in sequelize/cli

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.