feathers-reactive icon indicating copy to clipboard operation
feathers-reactive copied to clipboard

Error: Cannot find namespace 'sift'.

Open rmanibus opened this issue 2 years ago • 12 comments

Steps to reproduce

Add this library to a typescript angular project And configure feathers with rx:

import { feathers} from '@feathersjs/feathers';
import { rx } from 'feathers-reactive';
       feathers().
      .configure(
        rx({
          idField: '_id',
        })

Expected behavior

Tell us what should happen feathers is configured properly

Actual behavior

Error: ../node_modules/feathers-reactive/dist/index.d.ts:76:61 - error TS2503: Cannot find namespace 'sift'.

76     var sift: <TItem, TSchema extends TItem = TItem>(query: sift.Query<TSchema>, options?: Partial<sift_lib_core.Options>) => (item: unknown, key?: sift_lib_utils.Key, owner?: any) => boolean;

System configuration

Tell us about the applicable parts of your setup.

Module versions (especially the part that's not working):

NodeJS version: v18.17.0

Operating System:

Browser Version:

React Native Version:

Module Loader:

rmanibus avatar Aug 23 '23 13:08 rmanibus

Hi @rmanibus

thanks for posting this.

May I ask for a repro repo? I doubt there will be the time to set this up and also to reduce the risk of using some other setup then you.

Thanks! Matthias

bitflower avatar Aug 23 '23 14:08 bitflower

sure: https://github.com/rmanibus/feathers-reactive_reproducer_215

just run npm install then npm start

rmanibus avatar Aug 23 '23 16:08 rmanibus

I get the same error while compiling the module. I have to add import * as sift from 'sift'; This solves the problem.

pit999 avatar Oct 27 '23 06:10 pit999