Replies: 3 comments 3 replies
-
My temporary solution, was to change auth.ts line 34-37 from this: user: {
implementation: LucidProviderContract<typeof User>
config: LucidProviderConfig<typeof User>
} to this: user: {
implementation: LucidProviderContract<any>
config: LucidProviderConfig<any>
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hey @leocabeza! 👋🏻 Could you please dump your |
Beta Was this translation helpful? Give feedback.
0 replies
-
@RomainLanz , sure, here it is (This file had no change between updates): import { DateTime } from 'luxon'
import { BaseModel, column, HasOne, hasOne } from '@ioc:Adonis/Lucid/Orm'
import Setting from './Setting'
export default class User extends BaseModel {
@column({ isPrimary: true })
public id: number
@column()
public email: string
@column()
public name: string
@column.dateTime({ autoCreate: true })
public createdAt: DateTime
@column.dateTime({ autoUpdate: true })
public updatedAt: DateTime
@hasOne(() => Setting)
public setting: HasOne<typeof Setting>
} |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
After upgrading all dependencies and devDependencies,
yarn build
command is returning a Typescript error.What have I tried?
yarn install
The error I'm getting is this:
yarn build yarn run v1.22.19 $ node ace build --production [ info ] detected { @symfony/webpack-encore } [ info ] building frontend assets. Use { --no-assets } to disable [ encore ] Running webpack ... [ encore ] Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating [ encore ] Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating [ encore ] Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating [ encore ] Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating [ encore ] DONE Compiled successfully in 5316ms2:47:26 PM 8 files written to public/assets [ encore ] webpack compiled successfully [ info ] cleaning up "./build" directory [ info ] compiling typescript source files [ error ] typescript compiler errors contracts/auth.ts:37:45 - error TS2344: Type 'typeof User' does not satisfy the constraint 'LucidProviderModel'. Type 'typeof User' is not assignable to type 'new () => LucidRow & { password?: string | null | undefined; rememberMeToken?: string | null | undefined; }'. Construct signature return types 'User' and 'LucidRow & { password?: string | null | undefined; rememberMeToken?: string | null | undefined; }' are incompatible. The types of 'fill' are incompatible between these types. Type '(value: Partial<{ email: string; id: number; name: string; createdAt: DateTime; updatedAt: DateTime; }>, allowExtraProperties?: boolean | undefined) => User' is not assignable to type '(value: Partial<{ password: string | null | undefined; rememberMeToken: string | null | undefined; }>, allowExtraProperties?: boolean | undefined) => LucidRow & { ...; }'. Types of parameters 'value' and 'value' are incompatible. Type 'Partial<{ password: string | null | undefined; rememberMeToken: string | null | undefined; }>' has no properties in common with type 'Partial<{ email: string; id: number; name: string; createdAt: DateTime; updatedAt: DateTime; }>'. 37 implementation: LucidProviderContract<typeof User> ~~~~~~~~~~~ contracts/auth.ts:38:35 - error TS2344: Type 'typeof User' does not satisfy the constraint 'LucidProviderModel'. 38 config: LucidProviderConfig<typeof User> ~~~~~~~~~~~ Cannot complete the build process as there are typescript errors. Use "--ignore-ts-errors" flag to ignore Typescript errors [ info ] cleaning up "./build" directory error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I leave a copy of some files in case it helps:
contracts/auth.ts:
new package.json:
tsconfig.json:
old package.json:
Beta Was this translation helpful? Give feedback.
All reactions