Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Getting typescript errors while deploying the node app to heroku

$
0
0

I have been trying to deploy my typescript based node server to heroku but getting the following error while deployment

-----> Build       Running build> autoscan-back-end@1.0.0 build> rimraf dist && tsc       src/services/notification/notification.service.ts(46,37): error TS2322: Type 'string | ObjectId' is not assignable to type 'Condition<string>'.         Type 'ObjectId' is not assignable to type 'Condition<string>'.       src/services/report/report.service.ts(53,35): error TS2769: No overload matches this call.         Overload 1 of 3, '(callback?: Callback<ReportType[]>): Query<ReportType[], ReportType, {}, ReportType>', gave the following error.           Argument of type '{ _id?: string; admin: string | Types.ObjectId; status?: string; containsDublicates?: boolean; stickers?: [Types.ObjectId]; }' is not assignable to parameter of type 'Callback<ReportType[]>'.             Type '{ _id?: string; admin: string | ObjectId; status?: string; containsDublicates?: boolean; stickers?: [ObjectId]; }' provides no match for the signature '(error: NativeError, result: ReportType[]): void'.         Overload 2 of 3, '(filter: FilterQuery<ReportType>, callback?: Callback<ReportType[]>): Query<ReportType[], ReportType, {}, ReportType>', gave the following error.           Argument of type '{ _id?: string; admin: string | Types.ObjectId; status?: string; containsDublicates?: boolean; stickers?: [Types.ObjectId]; }' is not assignable to parameter of type 'FilterQuery<ReportType>'.             Type '{ _id?: string; admin: string | Types.ObjectId; status?: string; containsDublicates?: boolean; stickers?: [Types.ObjectId]; }' is not assignable to type '{ _id?: any; admin?: Condition<string>; status?: Condition<string>; containsDublicates?: Condition<boolean>; stickers?: Condition<[ObjectId]>; ... 55 more ...; validateSync?: Condition<...>; }'.               Types of property 'admin' are incompatible.                 Type 'string | ObjectId' is not assignable to type 'Condition<string>'.                   Type 'ObjectId' is not assignable to type 'Condition<string>'.         Overload 3 of 3, '(filter: FilterQuery<ReportType>, projection?: any, options?: QueryOptions, callback?: Callback<ReportType[]>): Query<...>', gave the following error.           Argument of type '{ _id?: string; admin: string | Types.ObjectId; status?: string; containsDublicates?: boolean; stickers?: [Types.ObjectId]; }' is not assignable to parameter of type 'FilterQuery<ReportType>'.-----> Build failed       We're sorry this build is failing! You can troubleshoot common issues here:       https://devcenter.heroku.com/articles/troubleshooting-node-deploys       If you're stuck, please submit a ticket so we can help:       https://help.heroku.com/       Love,       Heroku !     Push rejected, failed to compile Node.js app. !     Push failed

the project is running smoothly without any error locally, getting this on heroku only


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>