You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
when building the backend , I have got an unexpected error.
I don't really understand since the backend works in development mode.
I suppose it is related to db entities.
I have not used a db, I am at the moment using json db
my entities are as follow :
import { Entity, Fields } from "remult";
@Entity("Features", {
allowApiCrud: true,
})
export class Features {
@Fields.cuid()
id = "";
@Fields.number()
deltaA = 0;
@Fields.number()
Axis_0_2_Speed = 0;
@Fields.createdAt()
createdAt = new Date();
}
node_modules/remult/src/remult3/RepositoryImplementation.d.ts:193:5 - error TS2416: Property 'entityRef' in type 'FieldRefImplementation<entityType, valueType>' is not assignable to the same property in base type 'FieldRef<entityType, valueType>'.
Type 'EntityRef' is not assignable to type 'EntityRef'.
Types of property 'fields' are incompatible.
Type 'FieldsRef' is not assignable to type 'FieldsRef'.
Type 'FieldsRef' is not assignable to type 'FieldsRefBase'.
The types of 'find(...).entityRef.fields' are incompatible between these types.
Type 'FieldsRef' is not assignable to type 'FieldsRef'.
Type 'FieldsRef' is not assignable to type '{ [Properties in keyof MembersOnly]: NonNullable<entityType[Properties]> extends { id?: string | number; } ? IdFieldRef<entityType, entityType[Properties]> : FieldRef<...>; }'.
193 entityRef: EntityRef;
~~~~~~~~~ To Reproduce
tsc -p tsconfig.server.json
Expected behavior
a dist build
Screenshots
Desktop (please complete the following information):
OS: windows 10
Node v20.11.0
Additional context
The text was updated successfully, but these errors were encountered:
Describe the bug
when building the backend , I have got an unexpected error.
I don't really understand since the backend works in development mode.
I suppose it is related to db entities.
I have not used a db, I am at the moment using json db
my entities are as follow :
node_modules/remult/src/remult3/RepositoryImplementation.d.ts:193:5 - error TS2416: Property 'entityRef' in type 'FieldRefImplementation<entityType, valueType>' is not assignable to the same property in base type 'FieldRef<entityType, valueType>'.
Type 'EntityRef' is not assignable to type 'EntityRef'.
Types of property 'fields' are incompatible.
Type 'FieldsRef' is not assignable to type 'FieldsRef'.
Type 'FieldsRef' is not assignable to type 'FieldsRefBase'.
The types of 'find(...).entityRef.fields' are incompatible between these types.
Type 'FieldsRef' is not assignable to type 'FieldsRef'.
Type 'FieldsRef' is not assignable to type '{ [Properties in keyof MembersOnly]: NonNullable<entityType[Properties]> extends { id?: string | number; } ? IdFieldRef<entityType, entityType[Properties]> : FieldRef<...>; }'.
193 entityRef: EntityRef;
~~~~~~~~~
To Reproduce
tsc -p tsconfig.server.json
Expected behavior
a dist build
Screenshots
Desktop (please complete the following information):
Node v20.11.0
Additional context
The text was updated successfully, but these errors were encountered: