Cli: sequelize init cannot read .sequelizerc

Created on 13 Apr 2018  路  6Comments  路  Source: sequelize/cli

What you are doing?

I want to make .sequelizerc

// .sequelizerc
const path = require('path');

module.export = {
  "config": path.resolve('./server/config', 'config.jsons'),
  "models-path": path.resolve('./server/models'),
  "seeders-path": path.resolve('./server/seeders'),
  "migrations-path": path.resolve('./server/migrations')
}

and i run sequelize init

What do you expect to happen?

i expect to get config models seeders migrations inside server folder

What is actually happening?

it place the config models seeders migrations outside server folder

__Dialect:__ postgres
__Database version:__ 10.3
__Sequelize CLI version:__ 4.0.0
__Sequelize version:__ 4.37.6

All 6 comments

I have the following that is working:
"models-path": path.resolve('./','server/models'),

@fahmifan what is your Node version?

Mine is 8.9.0

Mine is 8.9.0

I think it solved

Only as a clarification for future reference:
You have a typo

// .sequelizerc
const path = require('path');

Typo ===> module.export = {
  "config": path.resolve('./server/config', 'config.jsons'),
  "models-path": path.resolve('./server/models'),
  "seeders-path": path.resolve('./server/seeders'),
  "migrations-path": path.resolve('./server/migrations')
}

it should be module.exports module.exports

Was this page helpful?
0 / 5 - 0 ratings