adonisjs/ally

Error Cannot find module 'Model' when update version from 2.2.0 to 4.1.5

atjab opened this issue · 3 comments

atjab commented

I update @adonis/ally version from 2.2.0 to 4.1.5. I got error Cannot find module 'Model'

{
     "adonis-version": "4.1.0",
     ...
     "dependencies": {
         ...
         "@adonisjs/ally": "^4.1.5",
         "@adonisjs/fold": "^4.0.9",
     },
     ...
 }

In my app.js

const providers = [
    '@adonisjs/framework/providers/AppProvider',
    '@adonisjs/auth/providers/AuthProvider',
    '@adonisjs/bodyparser/providers/BodyParserProvider',
    '@adonisjs/cors/providers/CorsProvider',
    '@adonisjs/lucid/providers/LucidProvider',
    '@adonisjs/shield/providers/ShieldProvider',
    '@adonisjs/session/providers/SessionProvider',
    '@adonisjs/validator/providers/ValidatorProvider',
    'adonis-lucid-polymorphic/providers/PolymorphicProvider',
    '@adonisjs/ally/providers/AllyProvider',
    '@adonisjs/mail/providers/MailProvider',
    '@adonisjs/framework/providers/ViewProvider',
    '@adonisjs/drive/providers/DriveProvider',
    '@adonisjs/lucid-slugify/providers/SlugifyProvider',
    'adonis-scheduler/providers/SchedulerProvider'
];
Screenshot 2566-11-05 at 23 06 26

Well, @adonisjs/ally v2 was for Adonis 4. @adonisjs/ally v4 is for Adonis 5.x

You will need to upgrade your Adonis app to version 5. Or stay on @adonisjs/ally@2.2.0

atjab commented

Which version is newest for adonis 4.1

2.2.0