Error: migrate:run is not a registered command in Production


#1

Can someone help me here, am trying to migrate my tables for the first time in production in adonis v4.0 with command

adonis migration:run

But it throws an error message

> error: migrate:run is not a registered command

But when i do

adonis make:migration user

it runs without errors, am getting stuck here with this migration issue


#2

It’s adonis migration:run, be sure to run the correct command.


#3

Also run adonis —help when in doubt


#4

adonis —help gives me: error: —help is not a registered command


#5

Thank you, I have tried to use

adonis migration:run

and i get the

error: migration:run is not a registered command

yet i can do make:migration, i don’t seem to run any migration commands successfully

with adonis --help, i don’t see migration listed among


#6

Have u installed @adonisjs/lucid?


#7

Thanks @virk i solve it already, i had to install the dependency


#8

adonis —help gives me: error: —help is not a registered command

It should have double dash -- :smile:


#9

"npm install " must run before going for a migration. So that related dependency installed properly.


#10

First run adonis cli globally like : npm i -g @adonisjs/cli
After go for adonis -help


#11

In fact, you don’t need to install the CLI in production.

Run your server with node server.js and execute internal commands with node ace XXX.

> node ace migration:run --force