Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm start error - Type 'AnyObject' is missing the following properties from type 'Client': id, name, email, pass, and 5 more. #1

Open
Raman077 opened this issue Jun 14, 2019 · 0 comments

Comments

@Raman077
Copy link

Raman077 commented Jun 14, 2019

I recently started with running the movie rental code on my local windows10 machine. I did successfully run the two commands npm install and cd docker-database && docker-compose up -d. But when I tried to run npm start I got the following error(s) :

  Type 'Filter<AnyObject>' is not assignable to type 'Filter<Client>'.
    Type 'AnyObject' is missing the following properties from type 'Client': id, name, email, pass, and 5 more.

44         return await this.clientRepository.find(filter);
                                                   ~~~~~~

src/controllers/rent.controller.ts:46:47 - error TS2345: Argument of type 'Filter<AnyObject> | undefined' is not assignable to parameter of type 'Filter<Rent> | undefined'.
  Type 'Filter<AnyObject>' is not assignable to type 'Filter<Rent>'.
    Type 'AnyObject' is missing the following properties from type 'Rent': id, status, clientId, movieCopyId, and 4 more.

46         return await this.rentRepository.find(filter);
                                                 ~~~~~~

src/repositories/movie-copy.repository.ts:33:26 - error TS2345: Argument of type 'Filter<AnyObject>' is not assignable to parameter of type 'Filter<MovieCopy>'.
  Type 'AnyObject' is missing the following properties from type 'MovieCopy': id, status, movieId, getId, and 3 more.

33         return this.find(filter);
                            ~~~~~~

src/repositories/movie.repository.ts:31:30 - error TS2345: Argument of type 'Filter<AnyObject>' is not assignable to parameter of type 'Filter<Movie>'.
  Type 'AnyObject' is missing the following properties from type 'Movie': id, title, director, copies, and 4 more.

31             return this.find(filter);
                                ~~~~~~

src/repositories/movie.repository.ts:38:26 - error TS2345: Argument of type 'Filter<AnyObject>' is not assignable to parameter of type 'Filter<Movie>'.

38         return this.find(filter);
                            ~~~~~~


Found 5 errors.

Please let me know the fix for this or how I can help in removing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant