تابستون داره تموم میشه ها، فرصت‌ها محدودن کلی آفر جذاب در کمپین تابستون🔥👇
۰ ثانیه
۰ دقیقه
۰ ساعت
۱ سینا-همتی
پروژه بک اند بالا نمیاد
جامعه جاوا اسکریپت ایجاد شده در ۱۰ بهمن ۱۳۹۹

سلام.
استاد پروژه بک اند وقتی ‌‌‌nodemon رو اجرا میکنم این خطا رو میده.
میشه خواهش کنم استاد پاسخ سوالارو یکم اگر براتون ممکن باشه سریعتر بدین.ممنون میشم.

 

TSError: ⨯ Unable to compile TypeScript:
src/components/users/repositories/UserMongoRepository.ts:25:32 - error TS2345: Argument of type 'Partial<IUser>' is not assignable to parameter of type '_FilterQuery<_AllowStringsForIds<Pick<Pick<_LeanDocument<IUser>, "email" | "password" | "_id" | "__v" | "id" | "firstName" | "lastName" | "mobile" | "totalOrders" | "wallet" | "addresses" | "createdAt">, "email" | ... 10 more ... | "createdAt">>>'.
  Type 'Partial<IUser>' is not assignable to type 'RootQuerySelector<_AllowStringsForIds<Pick<Pick<_LeanDocument<IUser>, "email" | "password" | "_id" | "__v" | "id" | "firstName" | "lastName" | "mobile" | "totalOrders" | "wallet" | "addresses" | "createdAt">, "email" | ... 10 more ... | "createdAt">>>'.
    Types of property '$where' are incompatible.
      Type 'Record<string, unknown> | undefined' is not assignable to type 'string | Function | undefined'.
        Type 'Record<string, unknown>' is not assignable to type 'string | Function | undefined'.
          Type 'Record<string, unknown>' is not assignable to type 'string'.
25     return UserModel.updateOne(where, updateData)
                                  ~~~~~

سلام خطایی که ارسال کردید در مورد عدم تطبیق داده‌های ورودی برای به روز رسانی کاربر هست که فعلا می‌تونید مقدار ورودی where رو برابر با any قرار بدید و بعدا بررسی کنید.

کیوان علی محمدی ۱۱ بهمن ۱۳۹۹، ۰۹:۵۰