title: Type 'string' has no properties in common with type 'FindOneOptions<User>'
body: <p>I am trying to build a backend with express.js. I now have the following problem:</p>
  <pre><code>import { Request, Response } from &quot;express&quot;;
  import { getManager } from &quot;typeorm&quot;;
  import { User } from &quot;../entity/user.entity&quot;;
  
  
  export const GetUser = async (req: Request, res: Response) =&gt; {
    const repository = getManager().getRepository(User);
  
    const { password, ...user } = await repository.findOne(req.params.id);
  
    res.send(user);
  };
  </code></pre>
  <p>The following error always occurs:</p>
  <p>(parameter) req: Request&lt;ParamsDictionary, any, any, QueryString.ParsedQs, Record&lt;string, any&gt;&gt;
  Type 'string' has no properties in common with type 'FindOneOptions'.ts(2559)
  <a href="https://i.stack.imgur.com/kAjkc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kAjkc.png" alt="enter image description here" /></a>
  router.ts</p>
  <pre><code>router.get(&quot;/api/users/:id&quot;, AuthMiddleware, GetUser);
  </code></pre>
  <p>user.entity.ts</p>
  <pre><code>import {
    Column,
    Entity,
    JoinColumn,
    ManyToOne,
    PrimaryGeneratedColumn,
  } from &quot;typeorm&quot;;
  import { Role } from &quot;./role.entity&quot;;
  
  @Entity()
  export class User {
    @PrimaryGeneratedColumn()
    id: number;
    @Column()
    first_name: string;
    @Column()
    last_name: string;
    @Column({
      unique: true,
    })
    email: string;
    @Column()
    password: string;
  
    @ManyToOne(() =&gt; Role)
    @JoinColumn({ name: &quot;role_id&quot; })
    role: Role;
  }
  </code></pre>
  <p>Can anyone help me with my problem?</p>