Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run migration #23

Open
jura-b opened this issue Aug 26, 2018 · 1 comment
Open

Cannot run migration #23

jura-b opened this issue Aug 26, 2018 · 1 comment

Comments

@jura-b
Copy link

jura-b commented Aug 26, 2018

I couldn't run migration. The console throw the following error:


Error: Make sure CommandsProvider extends the base command

1 Kernel.addCommand
  /Users/juraboonnom/repo/EkoHBD/node_modules/@adonisjs/ace/src/Kernel/index.js:189

2 commands.forEach
  /Users/juraboonnom/repo/EkoHBD/node_modules/@adonisjs/ignitor/src/Ignitor/index.js:412

3 Ignitor._registerCommands
  /Users/juraboonnom/repo/EkoHBD/node_modules/@adonisjs/ignitor/src/Ignitor/index.js:412

4 Ignitor.fire
  /Users/juraboonnom/repo/EkoHBD/node_modules/@adonisjs/ignitor/src/Ignitor/index.js:754

The I try commenting out the

const commands = [
  // 'adonis-scheduler/providers/CommandsProvider'
]

on the app.js, the migration can be run, but the process does not exit. Hence I couldn't do things like node ace migration:run --force && npm start.

@hanandika
Copy link

put it on aceProviders

const aceProviders = [
  '@adonisjs/lucid/providers/MigrationsProvider',
  'adonis-scheduler/providers/CommandsProvider'
]

in providers

const providers = [
  '@adonisjs/framework/providers/AppProvider',
  '@adonisjs/framework/providers/ViewProvider',
  '@adonisjs/lucid/providers/LucidProvider',
  '@adonisjs/bodyparser/providers/BodyParserProvider',
  '@adonisjs/cors/providers/CorsProvider',
  '@adonisjs/shield/providers/ShieldProvider',
  '@adonisjs/session/providers/SessionProvider',
  '@adonisjs/auth/providers/AuthProvider',
  '@adonisjs/validator/providers/ValidatorProvider',
  '@adonisjs/mail/providers/MailProvider',
  'adonis-scheduler/providers/SchedulerProvider'
]

in aliases

const aliases = {
  Scheduler: 'Adonis/Addons/Scheduler'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants